Command-query Separation - Broader Impact On Software Engineering

Broader Impact On Software Engineering

Even beyond the connection with design by contract, CQS is considered by its adherents to have a simplifying effect on a program, making its states (via queries) and state changes (via commands) more comprehensible in a manner reminiscent of how Edsger Dijkstra's admonition against gotos did the same for control flow.

CQS is well-suited to the object-oriented methodology, but can also be applied outside of object-oriented programming. There is nothing inherently object-oriented about the separation of side effects and return values, and so CQS can be profitably applied to any programming paradigm that requires reasoning about side effects.

Read more about this topic:  Command-query Separation

Famous quotes containing the words broader, impact and/or engineering:

    ... the hey-day of a woman’s life is on the shady side of fifty, when the vital forces heretofore expended in other ways are garnered in the brain, when their thoughts and sentiments flow out in broader channels, when philanthropy takes the place of family selfishness, and when from the depths of poverty and suffering the wail of humanity grows as pathetic to their ears as once was the cry of their own children.
    Elizabeth Cady Stanton (1815–1902)

    Television does not dominate or insist, as movies do. It is not sensational, but taken for granted. Insistence would destroy it, for its message is so dire that it relies on being the background drone that counters silence. For most of us, it is something turned on and off as we would the light. It is a service, not a luxury or a thing of choice.
    David Thomson, U.S. film historian. America in the Dark: The Impact of Hollywood Films on American Culture, ch. 8, William Morrow (1977)

    Mining today is an affair of mathematics, of finance, of the latest in engineering skill. Cautious men behind polished desks in San Francisco figure out in advance the amount of metal to a cubic yard, the number of yards washed a day, the cost of each operation. They have no need of grubstakes.
    Merle Colby, U.S. public relief program (1935-1943)