Project Lambda: Java Language Specification draft
Paul Benedict
pbenedict at apache.org
Sat Jan 23 14:27:45 PST 2010
On Sat, Jan 23, 2010 at 10:43 AM, Stephen Colebourne
<scolebourne at joda.org> wrote:
> 2010/1/22 Alex Buckley <Alex.Buckley at sun.com>:
>> [15.8.7 Lambda instance invocation]
>> #()(42)!() // Evaluates to the value 42.
>>
>> #int() fortyTwo = #()(42);
>> assert fortyTwo!() == 42;
>>
>> #int(int) doubler = #(int x)(x + x);
>> assert doubler!(fortyTwo!()) == 84;
>
> I find the ! invocation pretty darn ugly I'm afraid. I can't help
> reading "not". The symbol also blends into the brackets visually.
>
Yes, this is horrible syntax. It is bound to be a stumbling block for
even those with the most nimble feet.
Paul
More information about the lambda-dev
mailing list