Hacker News new | ask | show | jobs
by incepted 3845 days ago
On top of that, the code above ignores errors, something that Go makes all too easy by not supporting exceptions.
1 comments

This 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.