Proposal: Type inference for variable definition/initialization using the 'auto' keyword.
Reinier Zwitserloot
reinier at zwitserloot.com
Mon Apr 6 17:37:18 PDT 2009
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