3 ms·
The problem doesn't seem to be typed errors the way you describe it, but using an enum or a finite union. Go has solved this by having the error interface as th
by aatd86 1y ago
The problem doesn't seem to be typed errors the way you describe it, but using an enum or a finite union.
Go has solved this by having the error interface as the default common error supertype across the type system and ecosystem for instance.
That doesn't preclude having finite subsets where it matters.
Now if for some reason you have to add new failure modes, probably that the library should bump its version.
Java's checked exception issue is probably another problem altogether. I'd tend to say control flow issue perhaps?