[Python-Dev] [PEP 3148] futures - execute computations asynchronously

Jeffrey Yasskin jyasskin at gmail.com
Sat Mar 6 08:14:36 CET 2010


On Fri, Mar 5, 2010 at 9:47 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Guido van Rossum writes:
>
>  > "Future" is a pretty standard CS term for this concept (as noted
>  > "promise" is another),
>
> I like the term "promise" better.  "Future" is very generic ("not now,
> but later"), whereas a "promise" is something I don't get from you
> now, but you will give me later.
>
> The wikipedia article is not very helpful on the implicit vs. explicit
> distinction.  As far as I can tell from it, that distinction isn't
> really attached to "future" vs "promise."  The only distinction the
> article described was in the context of the Alice language, where a
> future = promise (read-only) plus resolver (mutator).  IMO that's not
> a compelling reason for adopting "future" in Python.

It seems like a good idea to follow the choice other languages have
used for the name (if they tend to agree) regardless of whether the
evil Java followed it too. So let's take a poll:

Io: Uses "future" to refer to the implicit kind
(http://www.iolanguage.com/scm/io/docs/IoGuide.html#Concurrency-Futures)
Alice ML: Uses "future" to refer to the implicit kind, and "promise"
to refer to a handle that can fill in the future
(http://www.ps.uni-saarland.de/alice/manual/futures.html)
Java: Uses "future" to refer to the explicit kind.
(http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html)
AmbientTalk: Uses "future" to refer to something more like a deferred:
you register callbacks to run when the future is resolved.
(http://soft.vub.ac.be/amop/at/tutorial/actors#futures)
C++0x: Uses "future" to refer to the explicit kind; "promise"
similarly to AliceML, and "packaged_task" to get a future from a
callable. (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3035.pdf
section 30.6)
E: Uses "promise" to refer to the implicit kind, and "resolver" to
refer to a handle that can fill in the promise.
(http://wiki.erights.org/wiki/Promise)
Oz: A "future" is a read-only logic variable. I'm not entirely sure
what that means.
(http://www.mozart-oz.org/documentation/dstutorial/node2.html#label61)
PLT Scheme: Uses "future" to refer to the explicit kind.
(http://docs.plt-scheme.org/futures/index.html)
C#: Uses "Task<TResult>" to refer to the explicit kind.
(http://msdn.microsoft.com/en-us/library/dd321424(VS.100).aspx)
Id, from 1991: Used "I-structure" to refer to the implicit kind.
(http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.4920)
Scala: Uses "Future" to refer to the explicit kind.
(http://www.scala-lang.org/docu/files/api/scala/actors/Actor.html#%21%21%28Any%2CPartialFunction%5BAny%2CA%5D%29)

What languages did I miss? From this list, "future" seems to be the
most popular choice, and it doesn't seem to distinguish between the
implicit and explicit kinds.

Jeffrey


More information about the Python-Dev mailing list