Jump to content

Promise (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by CarlHewitt (talk | contribs) at 01:45, 10 July 2005 (Known implementations). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a promise (also known as a future in some languages) is a placeholder for a result that is not yet known, usually because a computation has not yet finished or a message from a remote party has not yet arrived. They were introduced in 1977 in the paper by Henry Baker and Carl Hewitt. The use of promises (futuures) can dramatically reduce latency in distributed systems because it enables pipelining of messages, called promise pipelining [1] [2].

Known implementations

Promises (futures) became more better known by its inclusion in programming lannguages such as MultiLisp and Act1. The use of logic variables for communication in concurrent logic programming languages is quite similar. These started with "Prolog with Freeze" and "IC Prolog", and became a true concurrency primitive with Concurrent Prolog, Flat Concurrent Prolog, Parlog, Vulcan, Janus, Mozart/Oz, Flow Java, and Alice. The single assignment "I-var" from data flow languages, included in Reppy's "Concurrent ML", is much like the concurrent logic variable.

The pipelining technique (using promises/futures to overcome latency) was invented independently twice in the 1980s. It was invented at Project Xanadu (circa 1989) and by Barbara Liskov in 1988.


Languages supporting "promises/futures/concurrent logic variables/I-vars" include:


Languages supporting promise pipelining include:

Reference

  • Henry Baker and Carl Hewitt The Incremental Garbage Collection of Processes Proceeding of the Symposium on Artificial Intelligence Programming Languages. SIGPLAN Notices 12, August 1977.

External references