Project Lambda: Java Language Specification draft
Daniel Latrémolière
daniel.latremoliere at gmail.com
Sun Jan 24 01:21:29 PST 2010
> I find the ! invocation pretty darn ugly I'm afraid. I can't help
> reading "not". The symbol also blends into the brackets visually.
>
> assert doubler.invoke(fortyTwo.invoke()) == 84;
>
> The simple approach is more verbose and explanatory, which is quite in
> the style of Java.
>
+1 for .invoke(). Much more readable.
And this can be easier for adding other informations on the lambda, like
parameters or return type.
fortyTwo.type() can return a MethodType instance (or a similar signature
type) like in MethodHandle case:
http://download.java.net/jdk7/docs/api/java/dyn/MethodHandle.html#type%28%29
Daniel.
More information about the lambda-dev
mailing list