Explicit keyword for "plain old local variable" storage class?

kris foo at bar.com
Sat May 27 13:20:45 PDT 2006


Jarrett Billingsley wrote:
> The problem is just when it comes to auto classes.  Either we come up with a 
> new keyword for the behavior of auto classes, i.e. "raii":
> 
> raii Foo f = new Foo();
> 
> // Type inference
> raii g = new Goo();
> 
> Or, something I was thinking - just reuse scope, as it's not used by itself 
> anywhere.
> 
> scope Foo f = new Foo();
> 
> Though I'll admit, it's not as self-explanatory as "raii Foo". 



Are you kidding? RAII is about as self explanatory as a goat in a 
tumble-dryer. On the face of it, the use of 'scope' here seems like a 
great idea :)



More information about the Digitalmars-d mailing list