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

Tom S h3r3tic at remove.mat.uni.torun.pl
Sun May 28 12:04:56 PDT 2006


Maybe something along the lines of one older proposal ?

// use 'auto' for type inference

auto k = Foo(2);          // raii; could be on the stack
auto l = new Foo(2);      // on the heap, gc'd

auto i = 1;               // raii in a way; on the stack
auto j = new int(1);      // on the heap, gc'd


That would mean one couldn't use static opCall, but it's usually used to 
fake ctors anyway...

/+
   To everyone: please don't suggest the 'raii' keyword... It's totally 
counter-intuitive in this case.
+/



-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O 
!M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y
------END GEEK CODE BLOCK------

Tomasz Stachowiak  /+ a.k.a. h3r3tic +/



More information about the Digitalmars-d mailing list