VERSION 2: Re: Proposal: Type inference for variable definition/initialization using the 'auto' keyword.
howard.lovatt at iee.org
Mon May 25 15:48:52 PDT 2009
The suggestion of making auto optional seems like a good idea to me as
it has a lot of use cases.
2009/5/26 Tim Lebedkov <tim.lebedkov at googlemail.com>:
> Hello Howard,
> (Jeremy - FYI)
> I have thought about it also. It would be useful to make "auto" optional.
> It was just not in the original proposal. And it would help (I'm not
> quite sure whether it is enough) with the "final" proposal from Jeremy
> Making "auto" optional would also allow code like
> static a = "clouds";
> private b = 44;
> I'm not quite sure yet whether I can change my proposal and about the
> implications and acceptance (and possible danger to the whole
> proposal) of this change.
> On Mon, May 25, 2009 at 1:00 AM, Howard Lovatt <howard.lovatt at iee.org> wrote:
>> The example:
>> final auto list = new ArrayList<String>();
>> seems strange, why not:
>> final list = new ArrayList<String>();
>> After all you are trying to reduce verbosity and making final
>> declarations the same length as variable ones will encourage people to
>> use final more, which is a good thing. The use of just final has been
>> proposed by many people for Java already, it won't break code. Also
>> this final only construct is consistent with other languages e.g.
>> Scala, JavaFX, etc. that use def and var (final and auto
>> -- Howard.
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
More information about the coin-dev