Steve Yegge's rant on The Next Big Language

Max Samukha samukha at voliacable.com
Mon Mar 12 07:14:09 PDT 2007


On Mon, 12 Mar 2007 09:34:39 -0400, Foo <foo at bar.zoo> wrote:

>I think the syntax of delegate literal should be simplified, like this:
>int[] squares = numbers.map( int(int x){return x * x;} );
>
>or ruby-like syntax:
>int[] squares = numbers.map( {int|int x| x * x} );

This works:
int[] squares = numbers.map((int x){return x * x;} );

The return value of the delegate literal is inferred from the return
expression type.





More information about the Digitalmars-d-announce mailing list