|
|
|
|
|
by MarkSweep
844 days ago
|
|
So I guess you have a point that since Go does not even have enum’s as a formal concept, they can’t suck. But this presumes that the only context where you can criticize Go is the context that only contain’s concepts expressible in Go. This is basically saying “Go does not have enums, therefore it cannot be criticized for lacking enums”. In the wider context of programming languages, enum is fairly well defined concept. Features like being able to convert a value to a string and do exhaustive checking on switch statements are widely implemented. The iota feature in Go is clearly imitating C’s enum keyword. It is fair to compare Go’s built-in ability to declare an enum-like type against other language’s ability to declare the concept. To be clear, I’m not saying every language has to have every feature. I’m just saying the lack of a feature in a language is not a sufficient reason to excuse its lack. |
|