Futures and Promises - Implicit Vs Explicit

Implicit Vs Explicit

Use of futures may be implicit (any use of the future automatically obtains its value, as if it were an ordinary reference) or explicit (the user must call a function to obtain the value, such as the get method of java.util.concurrent.Future in Java). Obtaining the value of an explicit future can be called stinging or forcing. Explicit futures may be implemented as a library, whereas implicit futures need language support.

The original Baker and Hewitt paper described implicit futures, which are naturally supported in the Actor model of computation and pure object-oriented programming languages like Smalltalk. The Friedman and Wise paper described only explicit futures, probably reflecting the difficulty of efficiently implementing implicit futures on stock hardware. The difficulty is that stock hardware does not deal with futures for primitive data types like integers. For example, an add instruction does not know how to deal with 3 + future factorial(100000). In pure object or Actor languages this problem can be solved by sending future factorial(100000) the message +, which asks the future to add 3 to itself and return the result. Note that the message passing approach works regardless of when factorial(100000) finishes computation and that no stinging/forcing is needed.

Read more about this topic:  Futures And Promises

Famous quotes containing the words implicit and/or explicit:

    The vanity of men, a constant insult to women, is also the ground for the implicit feminine claim of superior sensitivity and morality.
    Patricia Meyer Spacks (b. 1929)

    ... the Ovarian Theory of Literature, or, rather, its complement, the Testicular Theory. A recent camp follower ... of this explicit theory is ... Norman Mailer, who has attributed his own gift, and the literary gift in general, solely and directly to the possession of a specific pair of organs. One writes with these organs, Mailer has said ... and I have always wondered with what shade of ink he manages to do it.
    Cynthia Ozick (b. 1928)