|
|
|
|
|
by xenomachina
2375 days ago
|
|
Yes, but they are the only part of Java's type system that allows sum types. How do you declare a method that generically takes a function that in turn takes a K, returns a V, and can throw whatever checked exceptions it wants, and you'll rethrow them? Last I checked, this wasn't possible in Java. If checked exceptions were instead replaced with sum type return values, then it becomes trivial. |
|