News for hackers. Stuff that matters.
Re:Safer Enums in Go by ebingdom on Saturday May 14, 2022 @09:54AM (#31377930)
Rust's "enums" also include products. Each case can have multiple arguments. That's a sum of products. "Algebraic data type" is the proper term for what Rust calls "enums", since they encompass both sums and products.

(It is also true that structs are products. But that isn't relevant.)

Re:Safer Enums in Go by kibwen on Saturday May 14, 2022 @02:18PM (#31380750)
Rust's syntax makes plenty of concessions to familiarity, as a way of making up for the much more important and irreducible unfamiliarity that it brings to the table (e.g. ownership). Originally Rust used the keyword `tag` here (for "tagged unions"), then vacillated between `enum` and `union` for years and years prior to 1.0.