3 ms·
> For example, having special syntax for returning errors vs a more generic solution like multiple return values or returning a tuple. Even if this were true (
by pcwalton 10y ago
> For example, having special syntax for returning errors vs a more generic solution like multiple return values or returning a tuple.
Even if this were true (which it isn't—Go uses multiple return values for returning errors), returning a tuple would in no way make analysis harder. Detecting whether a function returns (T, err) for some T is utterly trivial.