As if old code wasn't bad enough

jdavidb on 2003-02-03T15:14:27

PL/SQL has a GOTO. And the code I'm looking at uses it.

/me tears my clothes, dons sackcloth, and sprinkles my head with ashes.


GOTO

Matts on 2003-02-03T16:17:11

Nothing wrong with goto. People over fear it, probably because of Djikstra's famous paper, but the truth is that paper was written before we had the ability to properly structure programs (ok not quite, but in a time when it was common to use languages that did not allow you to).

Used well and appropriately goto is a blessing.

Re:GOTO

jdavidb on 2003-02-03T20:47:34

In this case it seems to be used for a rudimentary exception handling routine. I would have definitely handled this with real exceptions (PL/SQL is the language where I first learned what exceptions were, although Java is the language where I learned to like them. Wait! Don't hit me!) or with conditional logic, but after getting to the point where I understand what the program is doing, I have to say it really isn't too bad of a problem.

This morning's post was just a snapshot of me in panic mode as I desperately tried to figure out what it was doing.