On 8/24/13 10:31 AM, Dmitry Olshansky wrote:
24-Aug-2013 04:44, H. S. Teoh пишет:
I've written up a proposal to solve the partially-constructed object
problem[*] in D in a very nice way by extending scope guards:

    http://wiki.dlang.org/DIP44


Destroy! ;-)


Instead of introducing extra mess into an already tricky ctor/dtor
situation. (Just peek at past issues with dtors not being called, being
called at wrong time, etc.)

I'd say just go RAII in bits and pieces.

Agreed. DIP44 supports an idiom of handling multiple unprotected resources within the same object, which should be infrequent and generally unrecommended.

Andrei

Reply via email to