Common Usage Patterns
While overall usage of gotos has been declining, there are still situations in some languages where a goto provides the shortest and most straightforward way to express program's logic (while it's possible to express the same logic without gotos, the equivalent code will be longer and often more difficult to understand).
These situations include: multi-level breaks, resource allocation/deallocation, error handling in C language, computed goto in Perl language.
Read more about this topic: Goto
Famous quotes containing the words common, usage and/or patterns:
“Words like freedom, justice, democracy are not common concepts; on the contrary, they are rare. People are not born knowing what these are. It takes enormous and, above all, individual effort to arrive at the respect for other people that these words imply.”
—James Baldwin (19241987)
“Girls who put out are tramps. Girls who dont are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesnt put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.”
—Fran Lebowitz (b. 1951)
“For the man who should loose me is dead,
Fighting with the Duke in Flanders,
In a pattern called a war.
Christ! What are patterns for?”
—Amy Lowell (18741925)