From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-02-24 09:13:52
On Wed, Feb 23, 2005 at 10:33:07PM +0100, Julio M. Merino Vidal wrote:
> > I see absolutely no reason to not move to something which is inherently more
> > logical like:
> > a > b > c > d
> Hmm indeed, much clearer. Any special reason about why you used the
> '>' operator in the example? I'm wondering if '|' could make sense
> (from the shell), although it doesn't implicitly reflect a "direction".
> Or what about '>>'? One could think of a process' pipeline as a stream
> (I think that would make sense if one considers the concepts of Source,
> Sink and Filter from Boost.Iostreams).
Except that writing to an ostream like this is not very intuitable:
istream >> filter >> ostream
I am used to writing to an ostream using operator<< not operator>>
and expect the syntax above to extract something into "filter", then
extract _something_else_ to "ostream", NOT the output of filter.
I think '|' is the best choice:
istream | filter | ostream
This is consistent with shell syntax and not inconsistent with IOStreams.
(that would be a valid shell command if "istream" == "cat < infile" and
"ostream" == "cat > outfile"
You don't need to duplicate the < and > shell redirections IMHO, they
are simply adornments. "cat < infile" is identical to "cat infile" and
"cat > outfile" could be written "cat -o outfile" if cat had a -o
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk