3 ms·
In languages with a Result type (or Either monad), you basically do have checked exceptions, even though the language has no exceptions.
by wizzwizz4 3y ago
In languages with a Result type (or Either monad), you basically do have checked exceptions, even though the language has no exceptions.
- ivolimmen 3y agoJava also has that option. There is an excellent library called vavr. It adds the Try and Either monad to Java.
- layer8 3y agoWith result types, you typically don’t get automatic exception propagation. I agree that overall it’s a spectrum of syntactic convenience, checked exceptions effectively form a sum type together with the regular return type.