lambda syntax tutorial (3. Defender Methods)
Howard Lovatt
howard.lovatt at gmail.com
Thu Aug 5 19:35:37 PDT 2010
>> To be consistent with Javadoc and Method References I would suggest:
>>
>> extension List<T> map(Mapper<T> r) default Collections#<T>listMapper;
>
> Ah, but that would only expose another inconsistency, which would surely
> result in the following question: "why can I use a method reference but not a
> lambda expression?"
To which I would say, why not?
extension List<T> map(Mapper<T> r) default #(r) { ... };
Looks good and useful to me.
But you have to remember that I favour:
List<T> map(Mapper<T> r) { ... }
-- Howard :)
More information about the lambda-dev
mailing list