Hacker News new | past | comments | ask | show | jobs | submit login

Sealed classes in Kotlin largely solve that problem for me, and Java is getting those. It's not quite the same, but most of the time I find that if I'm trying to do Int|String, it's primitive obsession and there is actually a better sealed type hierarchy I'm missing.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: