3 ms·
On top of that, the code above ignores errors, something that Go makes all too easy by not supporting exceptions.
by incepted 11y ago
On top of that, the code above ignores errors, something that Go makes all too easy by not supporting exceptions.
- thwarted 11y agoThis is an extremely contrived critique. The only place an error could occur in this code is if fmt.Println returns an error. What should happen if you can't display the output? Try to print an error? This is entirely appropriate for demo code and use of stdout like this. No one honors the return value from printf(3) in demo code either. Considering other languages, Python's print functionality doesn't have anything about returning or raising errors, and it wasn't even available as a function until 2.6.