Boost logo

Boost :

Subject: Re: [boost] Final lightweight monad, next gen futures and upcoming AFIO review
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2015-06-29 07:29:36


2015-06-29 12:31 GMT+02:00 Niall Douglas <s_sourceforge_at_[hidden]>:

> On 29 Jun 2015 at 10:05, Andrzej Krzemienski wrote:
>
> > >> Empty => False (future/monad/result/option)
> > >> Errored/Excepted => Indeterminate (future/monad/result)
> > >> Value => True (future/monad/result/option)
> > >>
> > > The meaning of empty in optional/option and future is not the same. For
> > > the fist is a valid state, for the second is an invalid state.
> > >
> >
> > If "empty" means something different in the case of three-type "result",
> > perhaps it deserves a different name?
>
> In my synchronous monad, empty is always an invalid state, just as
> with future.
>

In that case, perhaps name "empty" is not the best choice? It has positive
connotations like "empty optional" or "empty vector" which are as valid
states as only a state can be. I believe "invalid state" would reflect your
intention more clearly.

Regards,
&rzej


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