State of the (Java) Lambda
cr.openjdk.java.net
cr.openjdk.java.net
Compare the old
#(int x)(x + x)
To the new {x -> x + x}
Much more consistent with the syntax of normal Java. Seems to be borrowing from C#.The pound-sign lambda annoyed me since other lambda capable languages use it to denote comments. It wasn't a dealbreaker, but it certainly was less than preferred.
1. a keyword such as fn, fun, function, lambda. (Incidently, my language uses fn)
2. {...} are used to denote code blocks in many languages, including Java
3. -> or => are also used for functions in several languages (IIRC C# uses =>)
Now I've thought about it, I may add something similar as syntax in Unify: (tn + _ _2) (where tn stands for "terse function")