News for hackers. Stuff that matters.
Re:Learning a new language, or how I gained familiarity with Go by 62951413 on Wednesday August 17, 2022 @04:01PM (#32501037)
I cannot help thinking that golang's error handling is isomorphic to

* returning an error code from functions in C and all the time writing "err = f(); if (err != 0) .."

* returning a potentially null reference from a method in Java and all the time writing "var ref = f(); if (ref != null) .."

Exceptions were supposed to save us from this drudgery in late 90s. They did if you ask me. Options are a nice alternative if FP is your cup of tea.

There are no comments on this comment yet.