Borklog: One entry
21 October 2003"Considered Harmful" essays considered harmful. "As a theoretical debate grows longer, the probability of a 'considered harmful' essay approaches one." The "goto considered harmful" one has been a thron in my side for a long time. I like to use
goto to branch to clean-up code when using an API (like unix) that is based on return-value error checking. I find having straight-line code with a goto to a cleanup section a lot easier to follow and maintain than the contortions that people who were indoctrinated with the "goto is eeeeeevil! avoid at all costs" go through just to avoid the goto. One of the Mac 3.0 AOL Client guys replaced some of my goto-based code (which interfaced with the Stuffit decompression libraries) with a more complex exception-based one (and exceptions are just fancy gotos anyway). The original code worked. The "better" replacement code was broken.