One of the first things Noah does after emerging from the ark is offer a burnt animal sacrifice. Uh, was that a good idea? Weren’t animals kind of a precious and rare commodity? Didn’t his act of worship render something extinct? Oh well.

This has meaning for very few people, but I’ve come to be philosophically against exceptions in code. I pretty much agree with Joel’s stance on this one. And that is, most everyone agrees that gotos (in C) are bad. Why are people so accepting of exceptions, which in essence are gotos?

I’ve been working on some python stuff that runs as a daemon and the most frustrating thing has been unexpected exceptions. I could blame the original author for not handling them well. But I’m also inclined to blame the language for not making it clear what kinds of exceptions to expect. They can come from anywhere and be most anything, so it’s nearly impossible to handle everything correctly beyond having a generic catch all, which seems kind of lame.

Exceptions are gotos. And I’m against them.

Leave a Reply

Your email address will not be published. Required fields are marked *