#What happened to `io.Reader.readInt`?

1 messages · Page 1 of 1 (latest)

inland root
#

Seems like the new std.Io.Reader no longer has the readInt functions for reading a given integer type with given endianness from the stream. Io.Writer still seems to have writeInt. What do I use instead?

lament fractal
#

takeInt

inland root
#

Interesting. Why the rename?

lament fractal
#

it uses the reader's buffer now

inland root
#

And why rename it?

lament fractal
#

thats what the rest of the functions that read into the reader's buffer and then process the result are called ¯_(ツ)_/¯

restive umbra
#

I think andrew k doesnt like the names Reader and Writer and would rather have it be Source and Sink and so take and put as well

#

idk if he plans to rename Reader and Writer

warped nimbus
#

Maybe cause read sounds like it's an actual complete operation of reading while take sounds more ambiguous between taking from buffer or taking from an actual read