Uh... destructors?
Michel Fortin
michel.fortin at michelf.com
Tue Feb 22 10:32:20 PST 2011
On 2011-02-22 13:15:03 -0500, %u <wfunction at hotmail.com> said:
> So okay, fine... 2 out of about 8. That still doesn't mean the rest
> of them should be allowed, though... think about how confusing code
> with a "pure" destructor would be.
What's the problem with a pure destructor? It only means you can't
access global variables. If the object holds a pointer to somewhere,
you can still affect that somewhere.
In fact, if your struct's destructor isn't pure, how can you use it as
a local variable inside of a pure function?
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list