3 ms·
I like how Kotlin and Scala just let the errors bubble up to a level that cares. The code looks very clean and its clear where the error handling is.
by eweise 7y ago
I like how Kotlin and Scala just let the errors bubble up to a level that cares. The code looks very clean and its clear where the error handling is.
- dkarl 7y agoI really like this as well for most applications. You code the happy path and the errors that are part of the product behavior, error handling code is located where it makes sense, and unhandled exceptions get lumped into a catch-all error, such as 500 for an HTTP request. "finally" blocks take care of resources. It really hits a sweet spot for stability and honesty for applications like web services. I get that Go is targeting a systems niche where error handling is more sensitive. I think there will be fewer complaints about Go's error handling when people get a better sense for when to use it.