Skip to content

Suggestion: Change [Reflect the expected result] to [Reflect the positive result] #89

Open
@henriq-88

Description

@henriq-88

When it comes to booleans, instead of Reflect the expected result, I would suggest to use the positive result for the name.

E.g. instead of isDisabled I would use isEnabled.

This avoids mental overhead of having to think about:

  • negating negative variables (e.g. !isDisabled = not not enabled = enabled)
  • which boolean state is expected. (For example, is a button really expected to be disabled?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions