One day we might add some common utilities for error handling sealed classes to the Kotlin stdlib or maybe even some special syntax. However, I’d rather prefer to see it starting with community first. Programmers have to accept sealed types and start using them for the error in handling in their code. We need evidence (in code) that this is what people are more comfortable doing. So far, we have a long path ahead of us to wean people of abuse of exceptions. P.S. Rust did not have its ? operator on day 1 either.

Written by

Project Lead for the Kotlin Programming Language @JetBrains

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store