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:

    The difference between objective and subjective extension is one of relation to a context solely.
    William James (1842–1910)

    Hesitation increases in relation to risk in equal proportion to age.
    Ernest Hemingway (1899–1961)

    Along with the lazy man ... the dying man is the immoral man: the former, a subject that does not work; the latter, an object that no longer even makes itself available to be worked on by others.
    Michel de Certeau (1925–1986)

    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)