Re: [Haskell-cafe] The use of continuation monad in C++

2012-06-21 Thread Bartosz Milewski
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

Re: [Haskell-cafe] The use of continuation monad in C++

2012-06-21 Thread damodar kulkarni
Hello, Thanks for the post. It was very useful to me in getting some insight into this set of concepts. Also your others posts on C++ and FP are very useful. Damodar On Thu, Jun 21, 2012 at 1:17 AM, Bartosz Milewski wrote: > I published a blog for C++ programmers about the advantages of using th

Re: [Haskell-cafe] The use of continuation monad in C++

2012-06-21 Thread Heinrich Apfelmus
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

[Haskell-cafe] The use of continuation monad in C++

2012-06-20 Thread Bartosz Milewski
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/