News for hackers. Stuff that matters.
Re:Making a Go program 70% faster with a one character change by nemo1618 on Monday November 14, 2022 @03:53PM (#33600852)
Presumably this is for performance reasons: if a `Read` call involves, say, a network request, then returning "800, EOF" in one roundtrip is certainly nicer than "800, nil" -> "0, EOF" in two roundtrips. In practice... I suspect this happens rarely enough that it's not worth the cost. The performance edge case could be handled with an alternative API, e.g. an optional EOF() method.

There are no comments on this comment yet.