Skip to content

Clarify what the empty string should be treated as. #28

@thegrandpoobah

Description

@thegrandpoobah

As part of what constitutes truthiness, the spec uses the !! operator as an example for determining truthiness (in the section.yaml file). The problem is that in JavaScript (and possibly other languages, have not tried), the empty string would be coerced into a false value using that logic. Arguably this is not the intented behaviour, but this is never explicitly stated and currently open to interpretation and implementation differences. Although implementation differences are okay in some circumstances, I think this one should be eliminated by explicitly stating the role that the empty string plays.

For reference, consider the following issues logged under Mustache.js (although not spec-compliant, it is close enough in regards to truthiness to validate this issue):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions