Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Want Discriminated Unions in Kotlin? Use a Sealed Class
(
atomicobject.com
)
2 points
by
ingve
5 months ago
|
hide
|
past
|
favorite
|
1 comment
FrankWilhoit
5 months ago
[–]
Discriminated unions are a
terrible
way to enforce type safety. They are a backport of a physical-data-modelling antipattern. Inheritance or GTFO.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: