Syntax wise, we can be a lot smarter by moving to another JVM language:

  val userNames = userList.map(_.name)
or
  val userNames = userList map _.name

(both valid Scala)

So I'm definitely in the group here that's behind making this standardised
at the bytecode level.  The overriding need for backward compatibility just
makes it impossible to do anything truly elegant in Java, but this can just
be considered a mere triviality nowadays.


On 1 June 2010 09: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
>
> --
> 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]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>



-- 
Kevin Wright

mail/google talk: [email protected]
wave: [email protected]
skype: kev.lee.wright
twitter: @thecoda

-- 
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