| And usually getting into a position to need a goto is usually a sign that you need to reconsider the design. But as Yohimbe said, there are a handful of cases where it is justifiable.
Also, keep in mind, whatever construct you're using, when you get down to machine code, all loops and conditions are done through jumps.
(Pedantic Note: OK, so some assembly languages have special-purpose iterating constructs (e.g., the x86 LOOP[Z|NZ|E|NE] and REP[Z|NZ|E|NE] instructions), but they often are slower than the equivalent conditional jumps, and are rarely used. Compilers in particular avoid such constructs as they require extra code to recognize the special cases where they apply, which is generally not worth the compiler designers' effort to handle as they can be implemented in more general ways more easily and with considerable gain in compiling speed.)
|