<div dir="ltr"><div style="font-family:monospace" class="gmail_default">> > I actually like Checked Exceptions. I think<br>> > that, when used correctly, they enable an<br>> > easy to read style of programming that<br>> > separates the mess from the happy path.<br>> <br>> This is an important point; for all the folks<br>> out there who love to thump the table with<br>> "Checked exceptions were a failed experiment",<br>> there are plenty of people who see value in<br>> them quietly getting work done.<br><br>I actually wanted to expand on this point, in hopes that those who dislike Checked Exceptions might appreciate them more.<br><br>The thing I enjoy the most about Checked Exceptions is the thing I enjoy the most about the ternary operator and Java enums -- they give me totality and exhaustiveness checking. In fact, they were some of Java's earliest forms of totality and exhaustiveness checking -- long before we ever got Sealed Types and Switch Expressions.<br><br>And Exceptions do all that while giving you context and info (with minimal effort from the dev) that you would struggle to get any other way (line numbers and stack traces).<br></div><br></div>