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:
“When we consider what, to use the words of the catechism, is the chief end of man, and what are the true necessaries and means of life, it appears as if men had deliberately chosen the common mode of living because they preferred it to any other. Yet they honestly think there is no choice left. But alert and healthy natures remember that the sun rose clear. It is never too late to give up our prejudices.”
—Henry David Thoreau (18171862)
“I am using it [the word perceive] here in such a way that to say of an object that it is perceived does not entail saying that it exists in any sense at all. And this is a perfectly correct and familiar usage of the word.”
—A.J. (Alfred Jules)
“Ive begun to appreciate the generational patterns that ripple out from our lives like stones dropped in water, pulsing outward even after we are gone. Although we have but one childhood, we relive it first through our childrens and then our grandchildrens eyes.”
—Anne Cassidy (20th century)