Subject: Re: [boost] [explore] Library Proposal: Container Streaming
From: Jeffrey Faust (jeff_at_[hidden])
Date: 2009-12-01 10:06:25
Michael Caisse wrote:
> I've been trying to think of when I might use such a library. Without
> the symmetry (input as well as output) I can think of few instances
> where this functionality might come in handy. Other than potential
> debug output, what else do you envision? What am I missing?
Yes, I mostly think of this for debug output. But that does come up
a lot. Similar to debug output would be testcase output. Something
the customer still does not see, but is certainly useful. An example
of something in production code might be printing a container out as
an html table.
> I'm also finding little improvement over the following example
> based on your samples. Here I am using Karma to produce the same
> output as Explore. It is a bit more verbose; however, it is infinitely
> more flexible.
In BoostCon 2007, we wanted something that worked like 'print(c)' where
'c' is any container. Other languages have this capability. We did
consider using Karma during that conference and somebody presented
this. It was decided to not be simple enough. The code samples you
provided are compelling, but it's not as dead simple as 'print(c)' or
the more C++ oriented 'cout << c'.
-- Jeff Faust
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk