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

> but in C, you pretty much always want the tag

We aren't discussing unions in memory layout, but in type systems. This also clearly indicates you aren't qualified for this discussion.





I believe that, by the description provided, most languages that you're talking about must actually represent 'untagged unions' as tagged unions under the hood. See my sibling comment. I'm curious

To be fair, even Wikipedia talks about "untagged unions" only in the context of C. The terminology is confusing and the literature often out of date.



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

Search: