VERSION 2: Re: Proposal: Type inference for variable definition/initialization using the 'auto' keyword.
neal at gafter.com
Tue May 26 16:04:46 PDT 2009
On Tue, May 26, 2009 at 3:45 PM, Joe Darcy <Joe.Darcy at sun.com> wrote:
> >> I hope we can have a new keyword :-)
> > We can't. You can ask Joe if you aren't willing to take my word for
> > it, but I'll eat my right shoe if a new global keyword (vs. a context
> > sensitive one like 'module'), especially something as common as
> > 'auto', which I'm sure exists as many a variable name already, is
> > deemed acceptable for Project Coin. Seriously. Pigs flying, hell
> > freezing over, and other such statements aren't hyperbole here.
> No new keywords in Project Coin!
It turns out this particular context can easily be handled by a
context-sensitive keyword (e.g. if you have a type named "auto" in scope,
then that is the type of the variable, otherwise the type is inferred from
However, I agree with Joe's previous assessment that this category of
proposed changes doesn't (in isolation) pay for itself, especially given the
likely addition of the "diamond new" inference on constructors. Which makes
me wonder why discussion continues on the topic.
More information about the coin-dev