Boost logo

Boost :

Subject: Re: [boost] Ternary logic programming (was: Re: [variant] Maintainer)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-07-02 22:23:48

On 2 Jul 2015 at 13:09, Steve M. Robbins wrote:

> I confess that I haven't been paying close attention to this thread, so I've
> missed it. What is the use case that you can't use the more-explicit
> has_value()/has_error()/etc?

If you want to program as if working with futures, you have a
Boost.Thread compatible API.

If you want to program monadically, you have your bind and map
operator overloads.

If you want to program with ternary logic, you can write using the &
and | operator overloads.

If you want to lazy execute, as this is a natural thing to want to do
with futures, there is a lazy functional execution API in there too.

These aren't simply aliased functions for the same thing. They are
all different ways of working with a fixed variant monadic state, so
the styles aren't commensurate. The programming style you choose
depends on your use case, and your personal preference, at the time.

There are also consequences on build time. Using a functional
programming style is much harder on the compiler than the future API
or the ternary logic.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at