Skip to content
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

enforcing 'UNSPECIFIED' for 0 in enums that are bitmasks feels wrong #24

Open
wijnandatgoogle opened this issue Nov 8, 2019 · 0 comments

Comments

@wijnandatgoogle
Copy link

Any enum value of 0 must have a name that ends with _UNSPECIFIED at the moment. That makes sense for regular enums that relate to something you can pick from a list. But when the enum is a bitmask, the value 0 is a valid and useful number. If there needs to be a check on naming conventions there too, I would suggest enforcing that it ends with _NONE. None makes sense to me because none of the flags in the bitmask are set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant