3 ms·
> quite literally a single postfix operator I disagree that the postfix operator is the primary language feature allowing rust's error handling. There is also
by TheDong 8y ago
> quite literally a single postfix operator
I disagree that the postfix operator is the primary language feature allowing rust's error handling. There is also the Result, aka a Generic Sum Type.
Go does not have generics or sum types, so it can't easily implement the generic 'Result<T, E>'. There's more to this than a bit of sugar.
Note that go does not have a generic "Into" either, which is a godsend for rust's errors.