4 ms·
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
by 62951413 4y ago
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.