Our great sponsors
-
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.
It's a contrived example, but you get the idea. You can do the same thing with Arrow Core's Either type or with https://github.com/michaelbull/kotlin-result . If I had to do it again, I'd probably just use Arrow Core for my current project. Having Either, Validated, NonEmptyList, and all of the helpers is great. The only "problem" is that there's a very steep learning curve and it's very complex because of Kotlin's lack of higher-kinded types. So if you let yourself get "sucked in" to Arrow's way of doing things, you'll be trying to figure out the weird workarounds they're doing to encoded concepts like higher-kinded types and type classes into Kotlin, which really doesn't have those things.