Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Traditionally, enums have been a single number type with many values (initialized in a counted one-by-one fashion).

Rust enums are as you describe, as they accidentally renamed what was historically known as sum types to enums. To be fair, Swift did the same thing, but later acknowledged the mistake. The Rust community doubled down on the mistake for some reason, now gaslighting anyone who tries to use enum in the traditional sense.

At the end of the day it is all just 1s and 0s. If you squint hard enough, all programming features end up looking the same. They are similar in that respect, but that's about where the similarities end.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: