Skip to content

Comment on What's New in Kotlin 2.0.0parent

Comments

No, and it won't. Checked exceptions were explicitly removed compared to Java, and most people view them as a mistake (including the Java 8+ ecosystem e.g. streams).

Try is a bit better and Kotlin has a bit of that with Result + runCatching. You can find a pretty good overview of the Kotlin error handling phylosphy here [1]

[1] https://github.com/Kotlin/KEEP/blob/master/proposals/stdlib/...

Also, Arrow.kt is worth mentioning for functional error handling.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.