Skip to content

Style guide: boolean or Boolean? #129

Open
@hugovk

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions