News for hackers. Stuff that matters.
Re:EOF is not a character by sfifs on Saturday March 14, 2020 @08:25AM (#22574746)
Or allow multiple return values like Go. EOF gets returned as an explicit error value and the io.Reader interface is standardized and widely used.
Re:EOF is not a character by ajnin on Saturday March 14, 2020 @08:59AM (#22574963)
It seems weird that Go considers EOF to be an error condition. Reaching the end of a file is a normal, expected outcome of reading files.
Re:EOF is not a character by barrkel on Saturday March 14, 2020 @09:14AM (#22575039)
By making error values explicit and handling them necessary, Go makes all error conditions expected outcomes.

Whether this is an advantage is heavily domain dependent.

Re:EOF is not a character by apta on Saturday March 14, 2020 @02:51PM (#22577636)
golang's approach is inferior and error prone. We already have better designed languages.