3 ms·
"Tagged union" is a generic non-language-specific term that people who study programming languages use to refer to the language feature that Rust calls "enum".
by ameliaquining 4y ago
"Tagged union" is a generic non-language-specific term that people who study programming languages use to refer to the language feature that Rust calls "enum". Other languages use different terms to refer to the same concept. The feature that Rust calls "union" is not a tagged union; it is an untagged union like in C (and exists primarily for the sake of compatibility with C code).