Comment

Comment by vips7L

The modern language landscape has not backed away from checked errors. Rust is praised for its checked errors, countless posts on this forum praise Result<T> in multiple languages. Swift has checked errors and Kotlin is implementing them via union types in the near future.

Checked errors, via results or exceptions have never been the problem. It has always been Java the language that hasn't provided the syntax sugar for handling checked errors effectively.

There is no difference between:

    A doIt() throws B
    fun doIt(): Result<A, B>
It all comes down to what the language lets you do once you encounter that error.
parent vips7L 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton