Idea for "scope" keyword
Craig Black
cblack at ara.com
Wed Nov 29 07:59:29 PST 2006
I thought it was very cool that .175 can instantiate an object on the stack
using the scope keyword. Would it be possible to take this one step further
and be able to use this approach on class fields so that they are not
instantiated on the heap? I know you can use structs for this, but I find
the limitations of D structs annoying.
class A {};
class B
{
scope A a = new A;
}
-Craig
More information about the Digitalmars-d
mailing list