by michaelbull · 2y ago · 0 comments
If this was true, why do Jetbrains themselves keep reinventing their own per-domain Result classes for their new code? For example, in their coroutines library they invented another Result type specifically for Channels[1] and isn't interoperable at all with their other Result type[2] that was also originally written to facilitate some of the coroutines code.
If Jetbrains' own internal library authors keep reaching for a Result type then I think we're better off following suit, because if they thought exceptions were superior in this example, they would have used them.
[1] https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-corout...
[2] https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/
No comments yet.