6 ms·
> The return signature (T, error) indicates that two values will be returned essentially as a tuple by the function Technically, yes, practically, it doesn’t t
by kaba0 2y ago
> The return signature (T, error) indicates that two values will be returned essentially as a tuple by the function
Technically, yes, practically, it doesn’t tell you anything, as its most common usage is how it would be used as a sum type (either one or the other).
And yeah, I didn’t quite think of multiple return values, but that itself can be just syntactic sugar over an `out` parameter.
But these technical details aside, I am not convinced that it is not “as useless as errno-type error handling”, with the only caveat of it returning an interface that is slightly more informative.