On Sun, 13 May 2012 17:38:23 -0400, Walter Bright
<newshou...@digitalmars.com> wrote:
This discussion started in the thread "Getting the const-correctness of
Object sorted once and for all", but it deserved its own thread.
These modules suffer from the following problems:
1. poor documentation, dearth of examples & rationale
2. toHash(), toString(), etc., all need to be const pure nothrow, but
it's turning out to be problematic for doing it for these classes
3. overlapping functionality with std.stdio
4. they should present a range interface, not a streaming one
I keep trying to avoid talking about this, because I'm writing a
replacement library for std.stream, and I don't want to step on any toes
while it's still not accepted.
But I have to say, ranges are *not* a good interface for generic data
providers. They are *very* good for structured data providers.
In other words, a stream of bytes, not a good range (who wants to get one
byte at a time?). A stream of UTF text broken into lines, a very good
range.
I have no problem with getting rid of std.stream. I've never actually
used it. Still, we absolutely need a non-range based low-level streaming
interface to data. If nothing else, we need something we can build ranges
upon, and I think my replacement does a very good job of that.
-Steve