Oh thank god, we saved ourselves six characters! And the only thing we sacrificed is knowing for sure whether we're accessing an object's property, or calling a method!
As a non-Ruby programmer, this sounds like it makes it non-obvious whether you're calling a class' method or attribute. Do you end up relying on your editor to help you out ?
Every langauge with native support for property setters and getters has the same problem. C# has decent IDE support, in JS we pretend it never happens, Ruby is at least upfront
I have no idea if I just invoked alpha(beta, gamma) and put the result into a single-member array, or if I've got an array with two elements - alpha(beta) and gamma.
Agreed. It is the "idiomatic" way of writing code in Ruby. I love Java but writing lambda expressions in Java with deeply nested parenthesis makes the code really ugly and less readable esp with chaining.
As far as I understand, Ruby style is writing the code in the most elegant way to increase readability and (hopefully) reduce chances of bugs.
Python has the `@property` decorator, which effectively disguises method calls as attribute access. To me, that's as bad, if not worse, than the ruby code posted above.
e.g.