Why Ruby?

Walter Bright newshound2 at digitalmars.com
Sat Dec 18 14:41:51 PST 2010


Jacob Carlborg wrote:
> foo(x, y => x * y);

The problem with all these is what is the difference between:

     { x * y }
     { x * y; }   <== note the ;
     { return x * y; }

The C++ lambda group had the same discussions.

It may not seem like much when the code is trivial, but when it gets more 
complex, having 2 or 3 different syntaxes for function bodies seems like a 
confusing disaster in the making.


More information about the Digitalmars-d mailing list