Jens-Uwe,
On Nov 12, 5:16 pm, Jens-Uwe Mager <
juma...@gmail.com> wrote:
> Well, to me it looks pretty much like a file. It has most of the interfaces
> that makes it work like a file in most of the cases, with some exceptions.
So, you agree that, while a buffer and a file are similar, they are
not the same.
This issue has come up several times. For example,
"The design of bytes.Buffer is to implement a stream; changing to a
random access object would not only make the code significantly more
complex and slower - and speed is very important to this code - but
would change the meaning of "read" from "consume" to "scan"."
"It would be much wiser to make a different type, probably one each
for bytes and strings, that implemented seeking and scanning rather
than consuming as the model for reading."
-rob [pike]
http://groups.google.com/group/golang-nuts/msg/a0c49db1db343ce0
Peter