Kotlin's Rich Errors: Native, Typed Errors Without Exceptions

(cekrem.github.io)

7 points | by todsacerdoti 20 hours ago ago

1 comments

  • simon_void an hour ago ago

    Rich Errors look promising to me, but what about interop with Java? What will the return-type of a function be on the Java side be, if the return type on Kotlin side is: Int | ParseError | SomeOtherError?

    Background: unions aren't restricted to one normal type and one error type, but to one normal type and any number of error types, so this can't be modelled as syntactic sugar on top of an implicit Either/Result type, can it??