4 ms·
>The thing is, the false dichotomy was painted before my time. I refuted it. No, it wasn't and you didn't. Result is one option among many in Rust which covers
by awused 3y ago
>The thing is, the false dichotomy was painted before my time. I refuted it.
No, it wasn't and you didn't. Result is one option among many in Rust which covers the common case with concise syntax, where (T, error) is the only option in Go. I am free to return a Success<T>, PartialSucceess<T + Error>, Failure <Error> in Rust/Java/C++/Ocaml/Typescript. I think you're operating on some profound misunderstandings about Rust, Haskell, Ocaml, Java, Typescript, C++, and even C. I don't think you're open to trying Rust, but maybe you'd be open to playing with std::variant in C++ or manually tagging unions in C, to see what those languages can do that Go cannot. Try writing a C++ function that returns std::variant between T, std:::tuple<T, Error>, and Error. That's only 3 cases, which Go cannot do.