Updated State of the Lambda

Rémi Forax forax at univ-mlv.fr
Fri Dec 9 13:07:33 PST 2011


On 12/09/2011 09:46 PM, Martijn Verburg wrote:
> Hi Brian,
>
> A couple of comments from me (_very_ much an end user as opposed to a
> language expert):
>
> 1.) I love the fact that this is going to reduce the number of
> anonymous inner classes that us developers are tempted to use.
> Nothing makes my optimism take a nose dive when helping debug a
> client's code and they start talking about the "38 anonymous inner
> classes we'll get to look through"
>
> 1.b) I appreciate that you guys have thought about possibly dealing
> with arbitrary capture of mutable variables and nonlocal control flow
> in a future version of the language.  One step at a time I think is
> sensible (especially as you'll get to see more usage patterns when 8
> is adopted), but I'm happy it's being thought about as anonymous inner
> classes like reflection should not be the first tool on the developers
> toolbelt (IMHO anyhow).
>
> 2.) I really like the 'functional interface' naming of what was
> formerly a SAM type - it makes a whole lot of sense to me and I
> suspect a lot of other developers.
>
> 3.) Tooling support for the some of the rules of lambda could be
> interesting to implement (especially around target typing).  If it
> helps we can try to reach out early to the IDE guys (in particular) to
> get them thinking about these issues.

Several IDE guys are already in the EG.

>
> 3.a.) I like the analogy of target typing being similar to the diamond
> operator in 7.  Since the Diamond operator is easily understood by
> developers, this will be a useful way of teaching it.
>
> 4.) Being able to do this:  List<String>  ls =
> Collections.checkedList(new ArrayList<>(), String.class);
>
> Is awesome, I have a use case for that right now :-)

I agree. It's always cool when the compiler get smarter.

>
> 5.) I liked the last section which ended up with
> people.sort(comparing(Person::getLastName)); it explains the reasoning
> well, a few things clicked.
>
> Great stuff Brian and pass on my thanks to the EG as well - to my end
> user eyes this looks like it is ticking along nicely.  Language gurus
> may of course have more indepth/valuable feedback to give.
>
> Oh and a comment on syntax.  We've got until well into 2012 to sort
> that out, so lets keep worrying about the semantics.  I for one hope
> that a lot of continued thought goes into the interaction between
> generics and lambdas as opposed to whether we use ->  or -->  etc.
>
> Cheers,
> Martijn

cheers,
Rémi



More information about the lambda-dev mailing list