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

That's the Go approach, where every value is zeroed so it makes sense for enum values to have a 'none' or 'other' or 'unknown' value as the first value.

(note that Go doesn't have enums as a language feature, but you can use its const declaration to create enum-like constants)



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

Search: