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)

    Like dreaming, reading performs the prodigious task of carrying us off to other worlds. But reading is not dreaming because books, unlike dreams, are subject to our will: they envelop us in alternative realities only because we give them explicit permission to do so. Books are the dreams we would most like to have, and, like dreams, they have the power to change consciousness, turning sadness to laughter and anxious introspection to the relaxed contemplation of some other time and place.
    Victor Null, South African educator, psychologist. Lost in a Book: The Psychology of Reading for Pleasure, introduction, Yale University Press (1988)