Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
abbeyj
on April 16, 2022
|
parent
|
context
|
favorite
| on:
Zig self hosted compiler is now capable of buildin...
If the union is untagged, how can it be determined (at runtime) that you've accessed the wrong field?
Spex_guy
on April 16, 2022
[–]
The compiler adds a tag in debug modes, but not in release modes.
a_t48
on April 17, 2022
|
parent
[–]
Neat, that's somewhere in between a `union` and a `std::variant`. You could build your own, but it's cool that it's a first class member of the language.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: