exceptions error handling lambdas

Feedback on checked exceptions and lambdas

I got a lot of interesting feedback on Checked exceptions and lambdas. Let’s start with my own: after writing the post, I realized I had written a similar post some time ago. Mistakes I made I made a mistake in the code regarding Apache Commons Lang 3, where I mistakenly used the recover() function, which is actually from Vavr. Apache Commons Lang provides a regular utility function, which mimics the custom code we wrote last week. Vavr offers the Try class, which encapsulates methods

exceptions error handling lambdas

Checked exceptions and lambdas

Java’s checked exceptions were a massive improvement over C’s error-handling mechanism. As time passed and experience accumulated, we collectively concluded that we weren’t there yet. However, Java’s focus on stability has kept checked exceptions in its existing API. Java 8 brought lambdas after the 'checked exceptions are great' trend. None of the functional interface methods accepts a checked exception. In this post, I will demonstrate three different approaches to mak

language design error handling java rust go functional programming

Error handling across different languages

I’ve tried Go in the past, and the least I could say is that I was not enthusiastic about it. Chief among my griefs was how the language handled errors, or more precisely, what mechanism it provided developers with to manage them. In this post, I’d like to describe how a couple of popular languages cope with errors. A time before our time I could probably go back a long time, but I needed to choose a baseline at some point. In this post, the baseline is C. If you search for 'err