Phobos vs Tango! What's your opinion?

Sean Kelly sean at f4.ca
Wed Apr 18 22:10:43 PDT 2007


James Dennett wrote:
> Sean Kelly wrote:
>> Paolo Invernizzi wrote:
>>> Very very very cool! We'll use it for sure in our C++ works!
>>> But is it really doable in D?
>>> What about the casts? Or about the GC, and the throws in the
>>> destructors when the Likely goes out of scope?
>> I haven't looked at the slides yet, but it is illegal to throw an
>> exception from a dtor in D, just as in C++. 
> 
> It's not illegal in C++, just generally ill-advised
> as it will terminate() the program if it occurs
> during stack unwinding while another exception is
> active.

True enough.  Throwing from a dtor isn't illegal, just effectively 
prohibited.  It's more than just a popular convention though, since many 
STL classes provide nothrow guarantees from their dtors.


Sean



More information about the Digitalmars-d mailing list