On 6/16/2014 2:23 AM, H. S. Teoh via Digitalmars-d wrote:
On Mon, Jun 16, 2014 at 12:18:26AM -0400, Nick Sabalausky via Digitalmars-d 
wrote:
[...]
C++'s lack of finally didn't do any favors for exception handling's
popularity, either. (Has "finally" finally been added?)

http://stackoverflow.com/questions/7779652/try-catch-finally-construct-is-it-in-c11

Apparently, C++ *still* doesn't have finally, preferring RAII instead.
Yet another nail in the too-little-too-late coffin that is C++11.


Ahh, ouch.

Some years back, I was very surprised when I came across Brian Hook's old "Book of Hook" article denouncing exceptions as a bad approach to error handling. Then I realized C++ didn't have "finally". All of a sudden his perspective made a lot more sense. :)

But wait...Hasn't Andrei created library-based scope guards for C++? (Or am I remembering something wrong?) How would that possible without "finally"?

Reply via email to