Goto
GOTO is a command found in many programming languages which instructs the computer to jump to another point in the computer program. GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, C/C++, and in many other languages, particularly assembly languages. In the assembly languages, the GOTO command is usually called BRA (from "branch"), JMP or JUMP, and is often the only way of organizing program flow.
Unlike a function call, a GOTO does not demand any preparation or restructuring of the code. Because of that, it becomes very easy to produce inconsistent, incomplete and generally unmaintainable spaghetti code. Because of that, as structured programming became more prominent in the 1960s and 1970s, numerous computer scientists came to the conclusion that good programs should always use the structured flow commands (loops, if-then statements, etc.) in place of GOTO. However, others claim that even though GOTO is generally bad, there are some tasks that cannot be accomplished in many programming languages without the use of GOTO statements, such as exception handling. Certain languages, such as Java, do not contain a GOTO statement.
One famous criticism of GOTO is the article by Edsger Dijkstra called Go to statement considered harmful (Communications of the ACM 11, 147-148. 1968). Donald Knuth's Structured Programming with goto statements (Computing Surveys, 6(4):261-301, December 1974) considers some of the places where GOTO may be the appropriate tool. Generally these are in situations where a particular programming structure is not available. In these cases, GOTO can generally be used to emulate the desired structure, since it is one of the fundamental building blocks of programming.
See also Functional programming.