Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tagged unions are an implementation detail and are often not the optimal way to solve this problem.

Take Option<Infallible>, it's a ZST, not only is there no "tag" there isn't any data at all. In type theory this is fine, we added an empty type to the unit type, we got a unit type.



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

Search: