Newbie initial comments on D language - scope

BCS ao at pathlink.com
Mon Jan 28 20:13:22 PST 2008


Reply to Edward,

> Yes, I can see that. My own idea of a 'scope' class in a GC
> environment, one that completely solves the RAII conundrum, is that
> one should be able to pass around an object of that class and when the
> last reference to that object goes out of scope the destructor is
> immediately called.
> 

IIRC scope just destructs the class on exiting the scope. With some more 
overhead it might be possible to do better, but it would be much more complex. 
I'd say "not now".





More information about the Digitalmars-d mailing list