[Haskell-cafe] The use of continuation monad in C++
bartosz at fpcomplete.com
Fri Jun 22 02:40:29 CEST 2012
It's an interesting approach. Your Then constructor maps to my Bind object
more naturally than >>= does.
The main reason for using objects rather than functions (closures) in C++
is that the compiler may be able to optimize/inline more code. Closures are
not first class citizens in C++ -- they cannot be returned from functions
or stored in variables without being converted to clunky std::function.
BTW, I'm studying your reactive banana library trying to learn more about
On Thursday, June 21, 2012 9:21:34 AM UTC-7, Heinrich Apfelmus wrote:
> Bartosz Milewski wrote:
> > I published a blog for C++ programmers about the advantages of using the
> > continuation monad in dealing with asynchronous API, concurrency, and
> > parallelism. I explained the concepts in Haskell and the translated them
> > into C++.
> > http://fpcomplete.com/asynchronous-api-in-c-and-the-continuation-monad/
> I always found the continuation monad to be hard to understand. An
> easier yet equivalent approach is presented in my "Operational Monad
> Tutorial" .
> : http://themonadreader.wordpress.com/2010/01/26/issue-15/
> : http://www.haskell.org/haskellwiki/Operational
> Best regards,
> Heinrich Apfelmus
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe