Re:Guido van Rossum Deconstructing Twisted's Deferreds
by pkinsky on Monday August 19, 2013 @07:41PM
(#6240648)
I'm probably missing something, but isn't Idea 4: Chaining Deferreds just flatMap over Futures? Scala may have spoiled me somewhat.
[ Parent
| on HN ]
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by noelwelsh on Tuesday August 20, 2013 @01:39AM
(#6242016)
Yes, 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.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by zeckalpha on Monday August 19, 2013 @07:49PM
(#6240680)
And errbacks are really just the Maybe monad.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by seanmcdirmid on Monday August 19, 2013 @08:09PM
(#6240763)
None 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.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by nostrademons on Monday August 19, 2013 @10:10PM
(#6241263)
Errbacks are the Error monad. Failure is the Maybe monad (or errbacks with callback=None).
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by dons on Tuesday August 20, 2013 @03:38AM
(#6242292)
Calling monadic bind "flatmap" makes me cry inside.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by DanWaterworth on Tuesday August 20, 2013 @06:47AM
(#6242815)
Indeed, it's like snatching defeat from the jaws of victory.
On a related note, Guido van Rossum gives monads 5/5 stars... sort of.