What I don’t like about Go’s error handling is that it’s built on returning a tuple of result/error instead of enum/union/variant/whatever-its-called. Which means that on error path you have to return something for successful result too (usually a “zero-initialized” struct because Go doesn’t have optionals). You are not returning result or error, you are always returning both. This is just wrong.
What I don’t like about Go’s error handling is that it’s built on returning a tuple of result/error instead of enum/union/variant/whatever-its-called. Which means that on error path you have to return something for successful result too (usually a “zero-initialized” struct because Go doesn’t have optionals). You are not returning result or error, you are always returning both. This is just wrong.