Booleans
Booleans
Booleans hold true/false values representing some condition. Conditions can get complex, and a boolean variable name can capture a lot of meaning more concisely than complex conditions. Therefore, assigning boolean expressions to local variables, as long as they have good names, is a powerful way to communicate intent to other programmers. There are several important considerations in crafting good boolean variable names described in the sections below:
, multiple selections available,
Related content
Make Meanings of Booleans Clear [DI28]
Make Meanings of Booleans Clear [DI28]
More like this
Make Sure Boolean Names Imply True or False [VD6]
Make Sure Boolean Names Imply True or False [VD6]
More like this
Use Positive Boolean Names [VD7]
Use Positive Boolean Names [VD7]
More like this
Name Boolean Constants Based on What They Conceptually Represent [VD10]
Name Boolean Constants Based on What They Conceptually Represent [VD10]
More like this
Giving Names to Boolean Literals [VU2]
Giving Names to Boolean Literals [VU2]
More like this
Break Up Compound Conditions into Separate Sub-conditions [VD9]
Break Up Compound Conditions into Separate Sub-conditions [VD9]
More like this