Why is there no std.stream anymore?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Dec 11 23:20:57 UTC 2017


On Monday, December 11, 2017 22:58:53 Jordi Gutiérrez Hermoso via 
Digitalmars-d-learn wrote:
> On Monday, 11 December 2017 at 21:21:51 UTC, Steven Schveighoffer
>
> wrote:
> > Use the undead repository:
> Wow, really? Is the removal of stream from D some kind of error
> that hasn't been corrected yet?

std.stream was deemed to not be up to Phobos' current standards, and it's
not in line with Phobos' current design and implementation (most notably, it
doesn't support ranges at all). No one has cared enough to come up with an
alternative implementation and propose it for inclusion in Phobos. However,
for most needs, ranges do what you might do with a stream solution, and
std.bitmanip provides useful functions for byte-level manipulation (e.g.
taking the first elements from a range of ubytes and converting them to
int). Depending on what you're looking for,
http://code.dlang.org/packages/iopipe could also fit in quite well, though
it's very much a work in progress, and there are several serialization
libraries on code.dlang.org if that's more what you're looking for.

- Jonathan M Davis




More information about the Digitalmars-d-learn mailing list