2 ms·
This style of code with an emphasis on branch completeness is the biggest virtue Go gets from the lack of exceptions. I personally dislike that style since tha
by munk-a 8y ago
This style of code with an emphasis on branch completeness is the biggest virtue Go gets from the lack of exceptions.
I personally dislike that style since that level of detail seems extraneous for normal tasks, but when you need to write code with absolute assurances like this then preventing the stack from being unwound without an explicit return (or panic, because some stuff is just terrible) is quite helpful to inspect and insure you have full coverage.
- Ericson2314 8y agoRust's Result or Haskell's Either are wholely better for this purpose.