Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



While true, HTTP services in particular are a very, very common context.


Then use panic() and recover() for that special type of use-case. Just as easy as exception handling.


That's just exception handling with extra steps! ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: