Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-07-08 23:30:48


Rob Stewart wrote:
> From: "Jonathan Turkanis" <technews_at_[hidden]>
>> Rob Stewart wrote:
>>> From: Thorsten Ottosen <nesotto_at_[hidden]>
>>>> Jonathan Turkanis <technews <at> kangaroologic.com> writes:
>>>>
>>> Hmmm. I agree that the original names are misleading. They
>>> don't create a facade over another class, they are provide the
>>> functionality directly. However, "generic_streambuf" sounds too,
>>> well, generic.
>>
>> Meaning the names are pretty dull? Thats true. I guess I could call
>> them platinum_stream and platinum_streambuf ;-)
>
>> 0)
>
> I didn't mean dull so much as redundant or even useless (as in
> not providing any benefit).

Okay.

>>> Is there are reason not to call them simply "stream" and
>>> "streambuf?"
>>
>> I like these, except that streambuf is a typedef in namespace std for
>> basic_streambuf<char>.
>
> Yeah, that would be a problem if they were standardized, but
> there are likely to be a number of changes should they be
> standardized, that I'm not sure this is worth worrying about.
>
> OTOH, your concern about duplicating a name from the standard
> library that isn't intended as a replacement is well-founded.

>> Still, I like these names, and will think about using them.
>
> You may find these a bit redundant, but what about "iostream" and
> "iostreambuf?"

'iostream' suffers the same problem as 'streambuf': it already names a type in
namespace std.

> Another approach, which I like less, but might give you an idea,
> is "streamer" and "streambuffer." (Well, "streambuffer" is just
> fine, but I don't care much for "streamer.")

I think I need to keep stream and streambuf as components of the names, because
I don't want to rename filtering_stream/filtering_streambuf.

> Maybe a departure from "stream" is in order: pipe, pipeline,
> formatter, ...?

'pipeline' is already used for the return type of expressions like

   gzip_compressor() | base64_encoder() | file_sink(...)

I may use the name 'pipe' for wrappers for operating system pipes, or portable
replacements. 'formatter' seems in appropriate, since for now the library
handles only unformatted i/o, relying on the standard iostreams library to
provide a formatting layer.

Maybe I could go Alexandrescuesque:

    flex_stream, flex_streambuf

Or black separatist:

   xstream, xstreambuf

Actually, this looks pretty good. Maybe it would run afoul of the prohibition
against cryptic names; there's a precedent, however, in xtime from
Boost.Threads.

Jonathan


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