Skip to content

Allow 1 and 0 as booleans? #27733

Closed
Closed
@Grinnz

Description

@Grinnz

Describe the feature: #22200 and #26389 removed support for lenient booleans, which makes a lot of sense. Allowing arbitrary values as booleans is asking for silent mistakes like misspelling 'false'. However, the values 1 and 0 (or exact strings "1" and "0") are widely used or accepted as booleans in many programming languages, and for example in Perl and SQL are a generally used form of boolean since the languages have no native booleans. I don't feel that it would cause any of the same issues as the previous lenient booleans if these exact values were additionally allowed, and it would be convenient for instances where one is using various components with different boolean representations, in the case where '0' and '1' are the only representations that can be transparently used across all systems.

Metadata

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