I was looking into the
Enum design recommended by Microsoft (see here), and I found a statement that made me stop to think for a while:
X DO NOT use an enum for open sets (such as the operating system version, names of your friends, etc.).
It says that OS versions are considered as open set, therefore it should not be enumerated. Moving forward with my doubt: I’m developing a proxy to an API, and I’m thinking in allow the proxy’s consumers choose the API version. The approach that I got in mind it’s just define an
enum that lists all the API versions, thus consumers are allowed to pass which API version they want to use.
However, due to API versions is something that would be considered as open (eventually there will be more versions), I’m doubting in include the version choosing feature. So, does this guideline not fit in my scenario?