On 2013-01-28 03:25, Zach the Mystic wrote:
I first saw UFCS and optional parentheses in Ruby and it seemed both alluring and deceptively simple.
First, Ruby doesn't have UFCS. You can add a new method to any existing class but it's still not UFCS in the same way as D.
Second, optional parentheses in Ruby is simple due to not being in conflict with other syntaxes. In Ruby there are no public instance variables, they're always private. If you access something with the dot operator in Ruby, you're always calling a method.
There is not conflict with callable objects. In Ruby invoking a callable object uses a different syntax from invoking a method. A callable object is invoked using "obj.call()", or in Ruby 1.9 "obj.()".
-- /Jacob Carlborg
