3 ms·
There's an element of Nissan Taleb's "Dictatorship of the Small Minority"[1] at work here. If you bring together a random group of C++ programmers, some of the
by quotemstr 9y ago
There's an element of Nissan Taleb's "Dictatorship of the Small Minority"[1] at work here.
If you bring together a random group of C++ programmers, some of them will approve of exceptions and some of them will see exceptions as an abomination. The former group will grudgingly write non-exceptional code; the latter group will not write exceptional code (at least in C++). Consequently, the codebase ends up banning exceptions, the fact of which the anti-exception people use as evidence for more exception bans in other projects.
This dynamic doesn't speak to the validity of the argument against exceptions. It just indicates that it's usually easiest, socially, to just appease the anti-exception people.
[1] https://medium.com/incerto/the-most-intolerant-wins-the-dictatorship-of-the-small-minority-3f1f83ce4e15#.z5ry4bucq https://medium.com/incerto/the-most-intolerant-wins-the-dict...
- adrianratnapala 9y agoIn this case though, the dynamic goes both ways. Programmers brought up on modern C++ will frequently be just as intransigent against error-return values and other alternatives to exceptions. In my own experience, exceptions are useful because real programmers can't be trusted to handle errors at all. So it is better to crash the program than to allow silent corruption. And exceptions are more politically palatable than assertions. But if the quality of your team AND processes are high enough you can expect errors will actually be handled, then it is easier to do that correctly without exceptions.
- quotemstr 9y agoI hope that reasonable people in both camps can agree that blatant contract violation and assertion failure should result in fail-fast instant death. It's a sad environment that bans assertions.