On Tue, Jun 1, 2010 at 10:35, Moandji Ezana <[email protected]> wrote:
> On Tue, Jun 1, 2010 at 7:12 AM, Michael Neale <[email protected]>
> wrote:
>>
>> I think it shows it in its worst light, when others show examples it
>> is OK I guess...
>
> I agree, I don't think they're particularly ugly. Taking a simple, but real,
> example:
> List<String> userNames = userList.map(#(User u) {
>   u.getName();
> });
> I can't see anything so terrible or unreadable about that.
> Moandji

hhmmm...

wouldn't that be

List<String> userNames = userList.map(#(User u)(
  u.getName()  // note: round parens, no ";", implicit "return"
));

or

List<String> userNames = userList.map(#(User u){
  return u.getName(); // note: "return"
});

But yea, it's not so bad, considering that it's Java.

// Ben

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to