Why am I being downmodded? I'm quite serious. I think it'll help clean up some of my previous PHP code.
Why am I being downmodded? I'm quite serious. I think it'll help clean up some of my previous PHP code.
There are situations where it is the clearest and most concise way to express what you want (in modern times we emulate this functionality with continuations, exceptions, etc. because of the stigma attached to to GOTO). See http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pd... for a few examples.
Lots of perfectly respectable languages (Scheme, Lisp, C-Sharp, etc) have GOTOs in some form or another. Yes, you can abuse them, just like you can abuse functions, methods, objects, or anything else.
This article was posted a little while ago, and I thought it gave a very good, non-partisan account of gotos: http://david.tribble.com/text/goto.html