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:
“If you meet a sectary, or a hostile partisan, never recognize the dividing lines; but meet on what common ground remains,if only that the sun shines, and the rain rains for both; the area will widen very fast, and ere you know it the boundary mountains, on which the eye had fastened, have melted into air.”
—Ralph Waldo Emerson (18031882)
“Pythagoras, Locke, Socratesbut pages
Might be filled up, as vainly as before,
With the sad usage of all sorts of sages,
Who in his life-time, each was deemed a bore!
The loftiest minds outrun their tardy ages.”
—George Gordon Noel Byron (17881824)
“The ninety percent of human experience that does not fit into established narrative patterns falls into oblivion.”
—Mason Cooley (b. 1927)