auto storage class - infer or RAII?
Bill Baxter
dnewsgroup at billbaxter.com
Sun Nov 12 19:24:22 PST 2006
Walter Bright wrote:
> Carlos Santander wrote:
>> I don't think they're valid concerns (meaning they're subjective, not
>> everyone will have those ideas), but I think we (the D community) just
>> want a way to clearly differentiate both meanings of auto. So, choose
>> any two words: auto/scope, var/auto, def/scoped, foo/bar, and let's
>> move on.
>
> I think the auto/scope is probably the best idea.
That will have some affect on this:
int (a) = 3;
writefln(a);
int (exit) = 9;
writefln(exit);
which all is currently ok. But with scope as a storage class, this:
scope (exit) ;
would become ambiguious. Is it an empty scope(exit){} or is it a scoped
variable called exit that wasn't initialized?
Not a huge deal, but perhaps a reason to consider using 'scoped' for the
storage class instead of reusing the 'scope' keyword.
--bb
More information about the Digitalmars-d
mailing list