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

Of course if you say 'you have to live with it' then you really have to 'live with it'. After some time, you no longer complain about it.

But this is 2013, there are somethings that expected to come from a language default. Exceptions are one of them, few such things I can think of are things like regular expressions, closures etc.



Exceptions are extremely controversial in programming language circles. They reduce encapsulation, and the try/catch syntax as seen in java encourages bad error handling. Any idiot can put their whole program in a giant try/catch block.

It's really a hard design problem. I agree that some form of error handling should be a language default, but I'm not sure if "traditional" exceptions should be it. As a C++ dev who has worked on projects with and without exceptions, I can say there is pros and cons to both.


It's not that hard, basically a solved problem in Common Lisp and more recently Rust: use conditions. They only unwind (not re-wind), so there's no worry about exception safety (as in C++) and they allow strictly more power than exceptions.


    But this is 2013, there are somethings that expected to 
    come from a language default. 
Very true!

    Exceptions are one of them,
Very false! :) Exceptions have a lot of detractors.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: