A syntax option (function types versus arrays)
Howard Lovatt
howard.lovatt at gmail.com
Thu Mar 11 21:56:09 PST 2010
You can have an identifier rather than a symbol if you add class
Lambda to java.lang then you could write:
Lambda< R( A ) throws E > lambda = new Lambda< R( A a ) throws E >( ... );
This is very similar to what is proposed for class MethodHandle, so it
would be consistent with JSR 292.
On 11 March 2010 20:29, Alex Blewitt <alex.blewitt at gmail.com> wrote:
> On 11 Mar 2010, at 08:52, Jakob Praher wrote:
>
>> Gernot Neppert schrieb:
>>> Why not go all the way to:
>>>
>>> lambda...
>> IMHO: It is far better to prefix the types with some letters than with a #.
>
> OK, I'll point out the obvious. any 'some letters' are currently a valid identifier in Java, and you can't guarantee that there's no-one in the world who hasn't used the identifier 'lambda' before. So pretty much any construct needs to be either one of the unused keywords in the existing Java language spec (e.g. goto) or something that currently isn't semantically correct in an existing Java program as an identifier (hence the #). That's not to say that necessarily # has to be the only other choice, but introducing a new keyword based on existing (potentially common) words is likely to cause issues.
>
> Alex
>
>
>
>
--
-- Howard.
More information about the lambda-dev
mailing list