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

You're confusing semantics for implementation. The point of union and discriminated union types (not what C calls union) is to enable compiler checked pattern matching, which tagged enums in C plus a switch statement do not get you.



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

Search: