|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2004-09-03 10:42:36
>"Dietmar Kuehl" <dietmar_kuehl_at_[hidden]> wrote in message
>news:200409031908.13053.dietmar_kuehl_at_yahoo.com...
>|On the ACCU 2003 conference JC (I can figure out the full name if
>|necessary...) presented the idea for creating filters which I really
>|liked. It looked something like this:
>|filter_stream out(tee(std::cout) | encode | gzip | file("some file"));
>|This would create a stream which writes everything to 'std::cout'
>|and also encodes the stuff before sending it on to compress it and
>|finally write it to the file. I like this notation...
>I second that
FWIW - I do NOT like this idea. I concede its mostly a matter of taste but
I think it adds another layer of syntax. I think the original .. push, etc
is ok. But my preference would be for
filter_stream out(
tee(
std::out,
encode(
gzip(
file("somefile")
)
)
)
)
I'm sure people are going to love this idea.
Robert Ramey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk