|
|
|
|
|
by mindslight
2686 days ago
|
|
The exceptions, meaning the runtime objects themselves, are indeed typed. But at the language level, unchecked exceptions are not part of method signatures (as you said), therefore not type- checked/declared/inferred. Therefore appropriately described as untyped - When calling a method, you have no (formal) list of unchecked exceptions that might be raised. If you think of exceptions as being an implicit union type around every function return (ie monad), analogous to how you have to explicitly check for errors in C/Rust, you'll see what I mean. Java's unchecked exceptions are akin to calling a function in Python that you expect to return objects of only one type, but not being "sure" that it can't return something else. |
|