Boost logo

Boost :

Subject: Re: [boost] Stacking iterators vs. dataflow
From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-09-03 13:55:58

On Wed, Sep 3, 2008 at 10:28 AM, Phil Endecott
<spam_from_boost_dev_at_[hidden]> wrote:
> David Abrahams wrote:
>> on Wed Sep 03 2008, "Phil Endecott" <>
>> wrote:
> [snip]
>>> rng >>= funcA >>= funcB ....
>> For which library are you suggesting that notation?
> That's the notation currently proposed for Dataflow. I would prefer no
> operator overloading here, but would accept operator|. Stjepan, is there
> any precedent (other languages etc.) for >>=?

Not that I am aware of. It was inspired by the >> operator use in C++, e.g.,

in >> out1 >> out2,

but I needed an operator that is evaluated right-to-left (I think it
had to do with making possible certain expressions that use both
branching and chaining). Also, I didn't want to clash with the common
extraction semantics of >> when in fact a permanent connection was
being created.

Now, It could be argued that >> or >>= would be more appropriate for
branching, as an expression like "in >> out1 >> out2" typically
implies that out1 and out2 are both getting their input from in
(rather than out1 serving as a filter). And "|" might be more
appropriate for chaining because of the piping analogy that you
mentioned. Perhaps the use of the two operators should be switched in
the Dataflow library. I am open to that.

Since they are just syntactic sugar (they just call the connect
function), it could even be possible to provide multiple sets of
operators, and let the user choose, but I could also see this as being
a source of confusion.


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