Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
ajnin
6y ago
0 comments
Save
Share
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
barrkel
6y 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.
j
/
k
navigate · click thread line to collapse