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:

    Much poetry seems to be aware of its situation in time and of its relation to the metronome, the clock, and the calendar. ... The season or month is there to be felt; the day is there to be seized. Poems beginning “When” are much more numerous than those beginning “Where” of “If.” As the meter is running, the recurrent message tapped out by the passing of measured time is mortality.
    William Harmon (b. 1938)

    Unaware of the absurdity of it, we introduce our own petty household rules into the economy of the universe for which the life of generations, peoples, of entire planets, has no importance in relation to the general development.
    Alexander Herzen (1812–1870)

    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)

    Evaluation is creation: hear it, you creators! Evaluating is itself the most valuable treasure of all that we value. It is only through evaluation that value exists: and without evaluation the nut of existence would be hollow. Hear it, you creators!
    Friedrich Nietzsche (1844–1900)