3 ms·
The problem is not that a new variant of an enum could be introduced, it is that an error that a library returns has the option to return an *inner* error, whic
by eptcyka 2y ago
The problem is not that a new variant of an enum could be introduced, it is that an error that a library returns has the option to return an *inner* error, which then could be a type defined by another library. Thus, if you develop library A and depend on library B, you cannot reasonably update B if you return it's errors because, by doing so, you're breaking your public API. Emotionally, I'm very much for breaking backwards compatibility and just bumping semver in these cases, but people more reasonable than myself have put forward the argument that such a policy would cause too much churn in the ecosystem.