Hacker News new | ask | show | jobs
by lllr_finger 2379 days ago
I've implemented this in Kotlin with sealed classes, and it's slowly taking over within our org. You don't get a few things (like the ? sugar) but it's still really nice.

I have no idea why the Kotlin std lib has a Result type but limits it to exceptions - such a missed opportunity.