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

> They seem almost completely unrelated to enums in C and other languages.

They're not. Payload-less enums devolve to C enums. Rust's enum simply build the enum+union enumeration pattern into the language, and allow leaving out the "union" part.



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

Search: