3 ms·
> The only programming language where exceptions are such a problem is C++. I'm not sure what you mean here, neither article is about the low-level issues tha
by MaxBarraclough 6y ago
> The only programming language where exceptions are such a problem is C++.
I'm not sure what you mean here, neither article is about the low-level issues that arise in C++. The second article only discusses C#. Chen's point is more about the way every call can surprise you by causing your code to return early.
- pjmlp 6y agoEINTR and longjmp can also surprise you, even in middle of calls, yet C doesn't have any exceptions.
- MaxBarraclough 6y agoYou're right that the C language has many weird and wonderful capabilities and footguns. How does that address Chen's point about exceptions being unmanageable?
- pjmlp 6y agoHis point doesn't stand in any programming language that doesn't enforce error checking, exceptions or not, you will be surprised at any possible execution point if you don't check error values from previous call. At least with exceptions you get a "I told you so" if something does happen, and a defined way to force application termination if the error isn't properly handled. Given the remarks on the C++ post, I assume he belongs to the /EH- side of pitch forks and torches, which actually goes against the C++ best practices at Microsoft, https://docs.microsoft.com/en-us/cpp/cpp/errors-and-exception-handling-modern-cpp?view=msvc-160 https://docs.microsoft.com/en-us/cpp/cpp/errors-and-exceptio..., which leaves a feeling of a kind of biased article in some way.