|
Boost : |
Subject: Re: [boost] Final lightweight monad, next gen futures and upcoming AFIO review (was: Re: [next gen futures] Lightweight monad r
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-28 16:52:09
On 28 Jun 2015 at 17:14, VinÃcius dos Santos Oliveira wrote:
> > plus these
> > new specialisations were added:
> >
> > * result<T>: empty/T/error_code (no exception_ptr).
> > * option<T>: empty/T (no error code nor exceptions).
> >
>
> I like these specialisations. Makes the code clearer.
>
> What do you think about renaming monad to async_monad?
monad<T>, result<T> and option<T> are all *synchronous* value
transports. Just like Rust's Result and Option.
future<T>, future_result<T> and future_option<T> will all be the
asynchronous versions with associated promise types.
I suppose you could have instead async_monad<T>, async_result<T> and
async_option<T>. But async_result<T> would collide with ASIO's
async_result, and that might be confusing.
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