Andy Sy wrote: > Huh? Futures are very different from continuations. I still have a > hard time understanding continuations (and am no fan of them), but > futures seem to be a rather simple abstraction to comprehend.
Isn't a future just a coroutine, or something equivalent? Sometimes there's a bit of confusion when people use the terms "coroutine" and "continuation" interchangeably. They're not quite the same thing. True continuations can be "resumed" more than once from the same state, whereas a coroutine can only be resumed once, after which its state has changed. This makes true continuations a good deal more complicated to implement, *unless* you've planned your entire language implementation from the outset with support for them in mind. CPython was *not* so designed. Coroutines are somewhat easier, but still present considerable difficulties for an implementation that works the way CPython does. Researching the history of Stackless will show why. Attempting to channel Guido a bit here, I'd say he also means that Py3k will not have *coroutines* either, or anything equivalent to coroutines, except insofar as they are provided by the operating system in the form of threads. Generators already go as far as it is possible to go into coroutine-land without unacceptably large changes to the implementation. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com