Hacker News new | ask | show | jobs
by sukilot 4065 days ago
Why does Rust incorrectly use the name "enum" for "tagged union" or "sum type"?
1 comments

Because in the simplest case when no variant has any associated data they are indistinguishable from C-style enums. The `enum` keyword was originally `tag` in ancient versions of Rust, and at least twice in the past three years there have been massive bikesheds to reconsider the keyword. You are free to dig through Rust's history if you'd like to understand why `enum` won out every time.