On Tuesday, May 28, 2013 11:30:55 Peter Williams wrote:
> Are the () necessary on sort?  I found:
> 
> auto sorted_array = an_array.dup.sort;

Any function which takes no arguments can be called without parens, and thanks 
to UFCS (Universal Function Call Syntax), you're calling these functions as if 
they were member functions and so they no longer have any arguments between 
the parens and so can be called without parens.

- Jonathan M Davis

Reply via email to