stream.d - Annoying Missing Types

Trevor Parscal Trevor_member at pathlink.com
Fri Jun 30 22:46:05 PDT 2006


I have said it before, but obviously it got lost in the mountain of "WALTER,
PLEASE DO THIS! I SWEAR IT'S IMPORTANT" requests...

Every time I update my DMD compiler, I have to add these 2 lines..


void read(out byte x) { readExact(&x, x.sizeof); fixBO(&x,x.sizeof); }
void read(out ubyte x) { readExact(&x, x.sizeof); fixBO(&x,x.sizeof); }

at line 2318 of src/phobos/std/stream.d

Some people say, "But it's an endian stream, so byte order doesn't affect
reading one byte." But how annoying is it when you need an endian stream to read
some bytes, some ints, and some longs ? VERY because these lines aren't in
there.

So for the sake of making it easier to use the stream class, even though it's
quite obvious why these lines weren't in there to begin with, I recomend they
are added to the distributed release of phobos.

Thanks for reading my ranting - I'm off to add the lines manually to the latest
release.. AGAIN.

Thanks,
Trevor Parscal



More information about the Digitalmars-d mailing list