Boost logo

Boost :

From: Matt Austern (austern_at_[hidden])
Date: 2001-08-13 13:02:17


Daryle Walker wrote:

> For the file descriptors, why don't you combine the input and output into
> one streambuf class?

I've written classes that are similar to Nico's, and my preference
has usually been to do the same thing he did: separate classes for
input and output.

My reason for doing that is that an input streambuf and an output
streambuf tend to look very different anyway. A streambuf that
does both ends up being little more than those two classes smooshed
together. Mixing input and output on the same stream is complicated
and restricted; on balance, I didn't think that the limited gain
was worth the extra complexity.

I wouldn't particularly mind having a combined input/output streambuf,
but I'd rather see it in addition to the two separate classes rather
than as a replacement. I'd like to have the simple classes for the
common cases.

                        --Matt


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk