-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is Categories an enum or an object? #214
Comments
The file contains a list of categories, although it may look like na enumeration it is just a list. The code that handles the objects, classes, dictionary, and categories expects a list of "attributes". |
That sounds like a distinction without a difference. The code expects a list of "things", where each thing is defined in the list of categories. The "attributes" used in objects is nothing like the "attributes" used in categories. Object attributes is not a list of the same kind of item, the items don't have UIDs, the items can be required or optional. If an enumeration walks like a duck and quacks like a duck, it is an enumeration no matter what it's called.
The more important question is can we define enumerated items to have proper (numeric) UIDs and identifiers (property names) the way categories do? |
String enums siblings have been addressed with #450 |
categories.json appears to be an enumerated list of items, but the items are called "attributes" as if they were properties of an object.:
represents a list of enumerated items:
But an example enum file is JSON data in a different format that represents the identical kind of enumerated list:
Proposal
Use the same data structure for enumerated lists in categories.json, all files in the enums directory, and other files where enums are embedded.
Using different data to represent the same kind of information is unnecessary. Putting numeric UIDs into strings is confusing because strings are often displayed in lexical order instead of numeric order (as can be seen in URL Categories). And using caption as a name may be unsuitable when the item should have an identifier but the caption (e.g. "System Activity") is not an identifier.
The text was updated successfully, but these errors were encountered: