2 ms·
This is eerily reminiscent of the discussions about Java’s checked exceptions circa 25 years ago.
by layer8 1y ago
This is eerily reminiscent of the discussions about Java’s checked exceptions circa 25 years ago.
- mananaysiempre 1y agoThe difference is that Java does not have polymorphism for exception sets (I think? certainly it didn’t for anything back then), so you couldn’t even type e.g. a callback-invoking function properly. Otherwise, yes, as well as the discussions about monad transformers in Haskell from 15 years ago. Effects are effects are effects.
- layer8 1y agoYou can abstract over a finite set of exception types in Java with generics, but it doesn’t always work well for n > 1 and is a bit boilerplate-y. The discussions I was referring to predate generics, however.