News for hackers. Stuff that matters.
Re:LLVM Programmer’s Manual by adamnemecek on Friday July 22, 2016 @01:17AM (#12141845)
You are correct but all those books on cpp exceptions are about a bit more than dealing with issues related to optionally disabling them :-).
Re:LLVM Programmer’s Manual by pjmlp on Friday July 22, 2016 @02:09AM (#12141980)
Agree, but that is because when compared with other languages exceptions in C++ were always bolted on.

They don't play well with manual memory management or the C semantics C++ was trying to be as compatible as possible.

They don't play well with:

- constructors/destructors

- manual resource management

- low level code like UNIX signals

- allowing every possible type to be used as exception

So all of that made C++ exceptions poor cousins of how exceptions are used in other languages.

I have used exceptions in quite a few languages and rather use them (the alternative being sum types), but do understand that how C++ evolved they are an unwelcome feature.

Re:LLVM Programmer’s Manual by quotemstr on Friday July 22, 2016 @04:21AM (#12142356)
It's only exceptions that allow constructors to work properly and that allow the language to support value type management. Without exceptions, you need two-phase initialization, and that's a nightmare.
Re:LLVM Programmer’s Manual by pjmlp on Friday July 22, 2016 @05:05AM (#12142479)
I hate two-phase initialization with passion, specially the way it was done in Symbian C++.