Preferences

Result<T> is a built-in in kotlin, but this enforces that the error type is a Throwable

If you fancy that an error could be just a type, not necessarily a Throwable, you might like Result4k - it offers a Result<T,E>

https://github.com/fork-handles/forkhandles/tree/trunk/resul...

disclaimer: I contribute to this.


Nice, what's the KMP plan there?

We currently use https://github.com/michaelbull/kotlin-result , which officially should work on KMP, but has some issues.

In Kotlin, my go-to library is https://arrow-kt.io/

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal