auto auto again
    Charles 
    nonone at nowhere.com
       
    Thu Aug 17 07:38:39 PDT 2006
    
    
  
Actually a further revision , based on an archived post I think this syntax:
MyClass c = local MyClass();
works better.  It looks good, and is very explicit.  'local' can be 
replaced with 'raii' , 'stack' or whatever you like.
Charles wrote:
> Just wanted to suggest that auto ( the auto that means destroy on scope 
> exit ) , be renamed to raii , or anything that eliminates the double 
> meaning of 'auto'.  I know auto in C was used to mean something similar, 
> but C has no automatic-type-deduction named auto, and the current 
> situation in D prevents one from doing an auto(type-deduction) 
> auto(destroy) declaration, as in : auto auto a = new MyClass;
> 
> Thx!  It is only an aesthetic change I know but I think it will add a 
> lot to the general flow of the language, as well as allow type deduced 
> raii variable declaration.
> 
> Charlie
    
    
More information about the Digitalmars-d
mailing list