Hacker News new | past | comments | ask | show | jobs | submit login

I think section 4.11 is the most important of the new material.



Thank you. I am taking a big risk by making the statement in 4.11 (in the online Appendix E), since it directly implies that none of C++, Java, Python et al actually do any exception handling at all. It's all control flow, always has been.

Still, I've actually wanted to write it there since I considered it to be important, and because that argument came into existence during the first Hacker News discussion about the book (and therefore is a product of more than just my mind).


You are kind of implying that :)

It may come down to how we actually use exceptions in those languages, however, that makes the difference. I worked on a system written in PHP + Bash which had been built to have some restartability. It was a horrible kludge, and to improve the system you had to pore over the logs to try to divine what had happened, but there was an attempt.


Yes, I'm implying that. For instance, a lot of Python's use of "throw" is not really because we want to signal an exception in some Python code, we just want to unwind the stack while passing some values and we can't do it in any other way in the language.

Again, that's just control flow, and that's because throwing exceptions is the only way of performing non-local exits in those languages. Actual exception handling starts when the existing control flow cannot handle some situation that has occurred, and someone - or something - needs to be able to create new control flow dynamically in order to continue program execution and therefore the process that was ongoing there.

Or, you know, we can do the industry standard: crash the program, and restart the thread or daemon or virtual machine or server cluster in question in hope that turning it off and on again helps. /s




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

Search: