another possibility would be to make it more like ...
# language-proposals
l
another possibility would be to make it more like an Either type, that encodes both the
success
type and the
error
type in the signature. this could look like this:
Copy code
kt
val someExceptionable: String??SomeException = something()
while this looks kind of ugly, it wouuuuld be a great way to encode errors. this should still support chaining of multiple exceptionable functions like with nullables, so if the error type isn't specified, it would need to automatically switch to the next common Supertype of all possible exceptions / error types