Hacker News new | past | comments | ask | show | jobs | submit login

As I understand it, Go doesn't even have what you get with C enums+certain compiler flags.



Nobody thinks that Go has every feature under the sun. Indeed, it lacks features that even C has.

What it does not lack, however, is enumerations. Enumerations establish the number of something. Go has that feature. That's all enums are. Nothing more, nothing less. Other languages have additional features, like value constraints, that can enhance the use of enums, but those are entirely different features.

The idea that Go doesn't enums because it lacks those other features is like saying that C doesn't have loops because it doesn't have the equivalent of Go's range operator. How ridiculous. Obviously C has loops. Anything else that might enhance those loops is a separate feature.


Then let me rephrase: Go lacks the kind of features around enums that I personally would expect every new statically typed language that was developed in the last quarter of a century should have (if it has enums at all).




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

Search: