Re:Guido van Rossum Deconstructing Twisted's Deferreds
by hcarvalhoalves on Monday August 19, 2013 @10:06PM
(#6241249)
OT: Isn't passing an object around that defines a series of callbacks to be applied essentially a... monad?
[ Parent
| on HN ]
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by noelwelsh on Tuesday August 20, 2013 @02:11AM
(#6242090)
Yes, futures/promises/whatever-you-want-to-call-them are monads in Scala and Haskell. The interface to these Deferreds are not, but it would be quite simple to make them so.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by jerf on Monday August 19, 2013 @10:10PM
(#6241260)
No. There's too many differences in all sorts of directions for this to be a useful way of approaching them.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by hcarvalhoalves on Monday August 19, 2013 @10:59PM
(#6241435)
Right, I'm stretching. For a moment I had a glimpse of it being the same design pattern, since Deferreds are composable.
Re:Guido van Rossum Deconstructing Twisted's Deferreds
by voyou on Tuesday August 20, 2013 @11:07AM
(#6244131)
Yes: here's an interesting discussion of promises (in JavaScript) in terms of monads: http://blog.jcoglan.com/2011/03/11/promises-are-the-monad-of...