Futures and Promises - Relation To Lazy Evaluation

Relation To Lazy Evaluation

Lazy futures, where the computation of the future's value starts when the value is first needed, are closely related to lazy evaluation. However, the term lazy evaluation is most often used to refer to an evaluation strategy for all computation in a language, whereas lazy futures represent specific values that are computed lazily, even in a language where computation is normally strict or eager. In C++11 such lazy futures can be created by passing the std::launch::sync launch policy to std::async, along with the function to compute the value.

Read more about this topic:  Futures And Promises

Famous quotes containing the words relation to, relation, lazy and/or evaluation:

    “It would be disingenuous, however, not to point out that some things are considered as morally certain, that is, as having sufficient certainty for application to ordinary life, even though they may be uncertain in relation to the absolute power of God.”
    —René Descartes (1596–1650)

    “Skepticism is unbelief in cause and effect. A man does not see, that, as he eats, so he thinks: as he deals, so he is, and so he appears; he does not see that his son is the son of his thoughts and of his actions; that fortunes are not exceptions but fruits; that relation and connection are not somewhere and sometimes, but everywhere and always; no miscellany, no exemption, no anomaly,—but method, and an even web; and what comes out, that was put in.”
    —Ralph Waldo Emerson (1803–1882)

    “So, when my days of impotence approach,
    And I’m by pox and wine’s unlucky chance
    Forced from the pleasing billows of debauch
    On the dull shore of lazy temperance,
    My pains at least some respite shall afford
    While I behold the battles you maintain
    When fleets of glasses sail about the board,
    From whose broadsides volleys of wit shall rain.”
    —John Wilmot, 2d Earl Of Rochester (1647–1680)

    “Good critical writing is measured by the perception and evaluation of the subject; bad critical writing by the necessity of maintaining the professional standing of the critic.”
    —Raymond Chandler (1888–1959)