Why no one recommends the use of the standard library's Result class but a custom sealed class approach?

This page summarizes the projects mentioned and recommended in the original post on /r/Kotlin

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • kotlin-result

    A multiplatform Result monad for modelling success or failure operations.

    Many people were not satisfied with basic sealed classes or Kotlin's Result class, and opted to either write their own implementation, use an existing one (like https://github.com/michaelbull/kotlin-result), or use Arrow.

  • resukt

    A Result type representing either a success or a failure.

    I made a result library, but unlike the sealed class approach, the implementation is basically copy-pasted from stdlib, except it is Result and a few changes. https://github.com/Jason5Lee/resukt

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • kotlinx.coroutines

    Library support for Kotlin coroutines

    Sure! runCatching catches Throwable right? Well when you cancel a coroutine it throws a CancellationException and this gets used as a signal to stop execution. runCatching stops that signal so the coroutine keeps running. Lemme find you a link real quick https://github.com/Kotlin/kotlinx.coroutines/issues/1814

  • KEEP

    Kotlin Evolution and Enhancement Process

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts