3 ms·
In some contexts, exceptions are just cleaner and easier. Definitely. The question is, are the benefits in those contexts worth the cost of the potential abuse
by stcredzero 7y ago
In some contexts, exceptions are just cleaner and easier.
Definitely. The question is, are the benefits in those contexts worth the cost of the potential abuses? As a codebase and company get larger and larger, the higher the probability that a problem will get into the codebase.
There is an analogy here with C++ templates and with method_missing meta-programming. There are some contexts where they make things a lot easier. However, in a large codebase, the probability that some programmer, somewhere is going to cause a costly problem with a bit of nifty overreach goes up and up.
- philwelch 7y agoWhile true, HTTP services in particular are a very, very common context.
- mikeschinkel 7y agoThen use panic() and recover() for that special type of use-case. Just as easy as exception handling.
- philwelch 7y agoThat's just exception handling with extra steps! ;)