Hacker News new | ask | show | jobs
by noelwelsh 4686 days ago
I think this distinction should be framed in terms of Python's futures, not futures per se. Python's futures (http://docs.python.org/dev/library/concurrent.futures.html#c...) are very limited. They lack the equivalent of the then method in Javascript promises. This means there is very limited ability to compose futures in Python.

Twisted's Deferred allow some kind of composition, though IMHO it is rather messy.

You'll note in Guido's emails he says Python's futures are based on Java's. Java's futures (I can say from experience) are a completely useless crock. All you can do is poll them, which makes the whole point of asynchronous operation moot (http://docs.oracle.com/javase/6/docs/api/java/util/concurren...)

Javascript's promises are a better implementation, as are those in Scala and Haskell.