5 ms·
I'm probably missing something, but isn't Idea 4: Chaining Deferreds just flatMap over Futures? Scala may have spoiled me somewhat.
by pkinsky 13y ago
I'm probably missing something, but isn't Idea 4: Chaining Deferreds just flatMap over Futures? Scala may have spoiled me somewhat.
- zeckalpha 13y agoAnd errbacks are really just the Maybe monad.
- seanmcdirmid 13y agoNone of these future/aync systems are very novel, but there is demand for them. Eventually most of them will fail and a few of the good ones will survive. And ya, they will resemble functional programming language X and Y in some of their features, because they aren't meant to be novel.
- nostrademons 13y agoErrbacks are the Error monad. Failure is the Maybe monad (or errbacks with callback=None).
- noelwelsh 13y agoYes, the Twisted Deferred is a not-quite-a-monad. The API would be simpler if it was, but I guess the original developers didn't have that insight at the time they were writing it.
- dons 13y agoCalling monadic bind "flatmap" makes me cry inside.
- DanWaterworth 13y agoIndeed, it's like snatching defeat from the jaws of victory. On a related note, Guido van Rossum gives monads 5/5 stars... sort of.