Thoughtworks Insights

The Either data type as an alternative to throwing exceptions

Exceptions are a mainstay of programming languages. They are commonly used to handle anomalous or exceptional conditions that require special processing, breaking out of the normal flow of the application. Some languages, such as C++ or Java, use them liberally. But not every language follows that design. C# or Kotlin don't have checked exceptions.
favicon
thoughtworks.com
thoughtworks.com