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

Union types are pretty ugly.

Eg they can't distinguish between one or two layers of nullable. Or between null and an optional null.

(In eg Rust syntax between `Option<Option<MyType>>` vs `Option<MyType>`. Or `()` vs `Option<()>`, where `()` would be how you spell `null` in Rust.)

Using tags is simpler and cleaner.




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

Search: