auto storage class - infer or RAII?
Walter Bright
newshound at digitalmars.com
Mon Nov 13 00:12:12 PST 2006
Bill Baxter wrote:
> Walter Bright wrote:
>> 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?
I don't think it'll be ambiguous. scope isn't a type or a function,
there is no:
static (a) = 3;
allowed anyway. The rule would be:
scope (
means a scope statement, otherwise scope would be a storage class.
More information about the Digitalmars-d
mailing list