Syntax decision

Talden talden at gmail.com
Sat Oct 1 04:16:11 PDT 2011


On Sat, Oct 1, 2011 at 11:38 PM, Stephen Colebourne
<scolebourne at joda.org> wrote:
> Personally, I find the selected syntax OK, but not great, except in
> the x -> expr form. Thats because I dislike the way that the argument
> brackets blend into the method parameter brackets when passing to a
> method as in sort((a,b) -> a - b). I always find its the blending of
> similar characters that is hardest to read, and why # was useful
> punctuation. Thats also why I might well prefer a Ruby-like sort(|a,b|
> a - b), because the characters do not blend in the same way.

This is where I'm at. Lambdas may be delayed execution or executed on
another or many threads, they _shouldn't_ blend into their
surroundings in the manner of other sequentially executed code.

> But anyway, I'm sure we'll get used to it.

I'm sure we'll get used to it, I'm also sure we'll get used to
occasionally overlooking the parentheses and '->' construct amongst
other expression text. I would have liked the syntax choice to do more
towards preventing that (especially with the eleventy bazillion
different ways Lambda code will get parenthesised, whitespaced,
line-broken and identified).

I think it will prove noticeable in my future recruitment efforts that
the hill for future Java developers (and a lot of current ones) has
become at least slightly unnecessarily steeper (it's steeper anyway of
course, maybe the slight increase in grade isn't enough to
detrimentally affect future java market traction).

--
Aaron Scott-Boddendijk


More information about the lambda-dev mailing list