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 true colour of life is the colour of the body, the colour of the covered red, the implicit and not explicit red of the living heart and the pulses. It is the modest colour of the unpublished blood.
    Alice Meynell (1847–1922)

    I think “taste” is a social concept and not an artistic one. I’m willing to show good taste, if I can, in somebody else’s living room, but our reading life is too short for a writer to be in any way polite. Since his words enter into another’s brain in silence and intimacy, he should be as honest and explicit as we are with ourselves.
    John Updike (b. 1932)