Something simpler?

John Nilsson john at milsson.nu
Wed Mar 17 12:29:40 PDT 2010


On Wed, Mar 17, 2010 at 1:09 PM, Osvaldo Doederlein <opinali at gmail.com>wrote:

> Java 7 will have new syntax for literal collections, so it's a top concern
> to have lambda/function type syntax that goes well with that

Seeing the proposal I was thinking that the invocation syntax might
integrate nicely with this. Maybe collection literals could be implemented
sharing the same syntax? This would be in the spirit of the apply and update
methods in Scala.

I do agree with the previous post that it doesn't look quite like Java
though. But I think it's mainly the types, I'd rather see
ordinary parentheses used for the type syntax.

+1 for having a single delimiterter between args and expr/stmts. Not
necessary using ':' but the use of a only a single delimeter for parameters
and expression nested in the same parenthesis/block groups the args with the
expression better. IOW (int a, int b: a+b) is better than (int a, int b) :(a
+ b) and (:5) much better than ():(5)

BR,
John


More information about the lambda-dev mailing list