Proposal: Type inference for variable definition/initialization using the 'auto' keyword.
alexandre.makarenko at free.fr
alexandre.makarenko at free.fr
Tue Apr 7 12:00:49 PDT 2009
method ?
it lacks the method body (or abstract or native modifier)
alex
----- Original Message -----
From: "Reinier Zwitserloot" <reinier at zwitserloot.com>
To: coin-dev at openjdk.java.net
Sent: Tuesday, April 7, 2009 2:37:18 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: Proposal: Type inference for variable definition/initialization using the 'auto' keyword.
Also,
> Map<String, List<String>> anagrams();
Actually looks like a method declaration (in fact, it is
indistinguishable from it!), so the syntax needs work.
--Reinier Zwitserloot
Like it? Tip it!
http://tipit.to
On Apr 6, 2009, at 23:31, Mark Thornton wrote:
> alex wrote:
>> Hi Tim,
>> a little bit late comment...
>>
>> what if
>>
>> Map<String, List<String>> anagrams();
>>
>> compiled as
>>
>> Map<String, List<String>> anagrams = new HashMap<String,
>> List<String>>();
>>
>>
> Why HashMap and not some other implementation of Map? That approach
> only
> works if the LHS specifies a concrete type and not an interface or
> abstract class.
>
> Mark Thornton
>
>
More information about the coin-dev
mailing list