Boost logo

Boost :

Subject: Re: [boost] Why a concrete monad class? (was Re: [next gen futures] Lightweight monad ready for inspection)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-07-01 20:54:37


On 1 Jul 2015 at 19:22, Vicente J. Botet Escriba wrote:

> >> Niall, I don't see why do you need to define a concrete monad class that
> >> is used to define other monadic types. The implementation of each
> >> specific monadic type has its own trade-offs.
>
> Could we then avoid to mention the monad class on these threads as it is
> an implementation detail.

basic_monad is the base class of everything. You probably wouldn't
use it directly, so it's an implementation detail.

monad<T> is a user facing specialisation for convenient use.

> So what are the public classes you would present for review?

Documentation for lightweight future promise:

https://ci.nedprod.com/view/Boost%20Thread-Expected-Permit/job/Boost.S
pinlock%20Test%20Linux%20GCC%204.8/doxygen/group__future__promise.html

Documentation for monads, which are base classes of the futures:

https://ci.nedprod.com/view/Boost%20Thread-Expected-Permit/job/Boost.S
pinlock%20Test%20Linux%20GCC%204.8/doxygen/group__monad.html

Note the futures are not finished yet. I don't expect them to be
considered finished until around 11th July. I have yet to do:

 - [ ] Implement N4399 continuations extended with monadic bind etc.
 - [ ] wait() should sleep the thread as necessary.
 - [ ] Implement wait_for()/wait_until().
 - [ ] when_any/when_all composure.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk