4 ms·
"untagged union" usually means "no discriminant" not "runtime discriminant." (Rust has both tagged (enum) and untagged (union) unions, but untagged ones are un
by steveklabnik 5mo ago
"untagged union" usually means "no discriminant" not "runtime discriminant."
(Rust has both tagged (enum) and untagged (union) unions, but untagged ones are unsafe and therefore mostly used for C interop and similar cases.)
- ameliaquining 5mo agoPeople often call Python/TypeScript unions "untagged unions" even though they're a very different creature from C/Rust unions. Ideally there'd be a term specifically for them but I'm not aware of one.