Goto - Common Usage Patterns

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, common, usage and/or patterns:

    “The inspired scribbler always has the gift for gossip in our common usage ... he or she can always inspire the commonplace with an uncommon flavor, and transform trivialities by some original grace or sympathy or humor or affection.”
    —Elizabeth Drew (1887–1965)

    “The British are a self-distrustful, diffident people, agreeing with alacrity that they are neither successful nor clever, and only modestly claiming that they have a keener sense of humour, more robust common sense, and greater staying power as a nation than all the rest of the world put together.”
    —Quoted in Fourth Leaders from the Times (1950)

    “...Often the accurate answer to a usage question begins, “It depends.” And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.”
    —Kenneth G. Wilson (b. 1923)

    “The ninety percent of human experience that does not fit into established narrative patterns falls into oblivion.”
    —Mason Cooley (b. 1927)