Y
Hacker News
new
|
ask
|
show
|
jobs
by
sfifs
2287 days ago
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.
2 comments
ajnin
2287 days ago
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.
link
barrkel
2287 days ago
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.
link
apta
2286 days ago
golang's approach is inferior and error prone. We already have better designed languages.
link