Comment by abenga

Comment by abenga 18 hours ago

4 replies

I don't know much Ruby outside of a few toy examples I wrote a long time ago. For most languages, there would be parentheses around objects you pass to functions, like `.filter({|x| x.odd? })`. This lends some consistency and makes it easy (for me at least) to understand that an anonymous function is passed to `filter`. Just separating it using spaces feels like Bash, something I find difficult to write anything slightly complicated in.

creata 17 hours ago

Lua, Haskell, ML, plenty of other languages where one-argument functions don't need parentheses. I think it makes a lot of code more readable.

  • abenga 16 hours ago

    All not-exactly-popular languages.

    • creata 16 hours ago

      Maybe relative to juggernauts like C or Java. But Lua is pretty widely used.