4 ms·
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.
by ajnin 7y 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.
- barrkel 7y agoBy making error values explicit and handling them necessary, Go makes all error conditions expected outcomes. Whether this is an advantage is heavily domain dependent.