Not only can we achieve a similar effect today, we can even drop the <>
today.

List<Integer> l = new ArrayList(); is valid Java.  Drop the warning for that
case, no new syntax needed.

On Wed, Sep 22, 2010 at 5:17 PM, Cédric Beust ♔ <[email protected]> wrote:

>
>
> On Wed, Sep 22, 2010 at 8:21 AM, Serge Boulay <[email protected]>wrote:
>
>> Is there some particular reason Oracle choose the diamond operator over
>> something like “var” ?
>>
>
> Introducing a new keyword is always very, very dangerous and has the
> potential to break a lot of code (witness what happened with assert), so any
> language designer worth their salt will always avoid doing so unless there
> is really no other way.
>
> The diamond operator is a reasonable compromise but considering that we can
> already achieve a similar effect today(*), I am not particularly thrilled by
> this new feature.
>
> (*) List<Integer> l = Lists.newArrayList();
>
> --
> Cédric
>
>
>
>  --
> 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.
>

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