auto, var, raii,scope, banana
Sean Kelly
sean at f4.ca
Fri Jul 28 08:06:55 PDT 2006
Don Clugston wrote:
>
> No, the idea is *not* to have a type inference keyword, but instead only
> specify the storage class:
>
> static a = 7;
> const b = 7;
> auto c = 7;
>
> Now 'a' is a variable, just as much 'c' is.
So long as the storage class is required, I'm all for it. This seems
more consistent than what we have now.
> I hope that one day D also gets explicit thread-local variables. They
> would need a seperate storage class.
I proposed this a while back and no one responded, so I went and added
thread-local storage to Ares. But it would be much nicer to have this
as a language feature.
> No, it's not. It's a storage class in C++, *not* a type inference
> keyword. It's just that it's a storage class that in modern times is
> only used in the context of type inference.
The things you learn. I don't think I've ever seen 'auto' used in a C
or C++ program, though I've come across 'register' quite a bit.
Sean
More information about the Digitalmars-d
mailing list