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

Style guide: boolean or Boolean? #129

Open
hugovk opened this issue Sep 10, 2024 · 1 comment
Open

Style guide: boolean or Boolean? #129

hugovk opened this issue Sep 10, 2024 · 1 comment

Comments

@hugovk
Copy link
Member

hugovk commented Sep 10, 2024

This came up at python/cpython#123845 (review).

We're not consistent in writing it upper or lower case. A rough search shows it's about 50-50:

rg -s "\bboolean\b" Doc | wc -l
      87rg -s "\bBoolean\b" Doc | wc -l
      78

Shall we pick something and put it in our style guide?


Looking at some other tech style guides, it's not clear cut.

Google says:

In most contexts, boolean refers to a specific data type in a specific programming language. In such cases, use code font and the exact spelling and capitalization of the programming keyword.

When referring to the abstract data type, use lowercase.

If you refer to Boolean mathematics or Boolean logic, use uppercase.

Microsoft says:

Always capitalize.

Red Hat says:

Boolean. Correct. Named after George Boole, who first developed the concept.

According to the IBM Style Guide, it is acceptable to use "boolean" (lowercase) in API programming information when it refers to a primitive return type.

Apple says:

Boolean (adj.)
Note capitalization.

@nedbat
Copy link
Member

nedbat commented Sep 10, 2024

I like the Google guidance. Capitalizing it all the time seems pedantic and distracting. English is full of eponyms that are not capitalized.

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

2 participants