|
|
|
|
|
by the_other_guy
2687 days ago
|
|
when I stated my argument I was accused of being ad hominem, making sarcastic, content-free snarks on barely related HN posts, arguing against enums is as stupid as arguing for null pointers (which ironically exist in golang too!), it's not minimalism if you don't have enums, it's intentionally lacking an elementary feature that does exist in almost every other modern (well, in even old) language, you can argue with "deal with it" just like it was the case with package management, error handling and many other features, that wouldn't be as bad as derailing the argument to "enums are not necessary" also, I feel strong about getting rid of cancer, should I write a treatise about the importance of getting rid of cancer since you may consider that not very important too? |
|
One off the top of my head that I run into all the time is in client stubs of service APIs, where a client-side enum representing a string value will break at runtime if the service adds a new string value.
In other words, enums inhibit API evolution.