3 ms·
C++ has strong opinions on why it is lacking finally [0], and D has both try...catch...finally, and scope statements e.g. scope(exit). Personally, I'm not sold
by dmunoz 13y ago
C++ has strong opinions on why it is lacking finally [0], and D has both try...catch...finally, and scope statements e.g. scope(exit).
Personally, I'm not sold that this is enough to argue for the removal of goto. I don't think goto-cleanup is the only sane use case of goto.
[0] http://www.stroustrup.com/bs_faq2.html#finally http://www.stroustrup.com/bs_faq2.html#finally