Why Ruby?

Walter Bright newshound2 at digitalmars.com
Sat Dec 18 16:01:37 PST 2010


Simen kjaeraas wrote:
> The problem of D's lambda syntax is it is optimized for longer
> functions. Usually, the delegates I write are one line long. I cannot
> see that this syntax collides with anything at the moment, but feel free
> to enlighten me:
> 
> { => 4; }
> { a => 2*a; }
> { a, b => a>b; }
> { => @ + @; } // turns into { a, b => a + b; }
> 

If size and simplicity of typing are critical, are those really better than:

   "a>b"

?


More information about the Digitalmars-d mailing list