Having the ability to throw an exception is great when you want to pass quickly back through lots of layers. Languages like Go make it so painful to get unique key violation in DB layer, to pass it to few layers of business logic, only to return error code to user.

For all other cases, languages that support algebraic data types (Scala/Kotlin) are great.

Solutions Architect @Depop, author of “Hands-on Design Patterns with Kotlin” book and “Web Development with Kotlin” course

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store