Skip to content

Logical helpers renaming #714

@lifeart

Description

@lifeart

This is draft about renaming

unless to if-not
and
neq to not-eq


Why not instead of unless ?

  • it's widely used outside ember (comparing to unless)
  • easier to understand (for non-english speakers)
  • less symbols to write

downsides:

{{#unless this.foo}} {{/unless}} has to be replaced with {{#if (not this.foo) }} {{/if}},
but, it's bring mutch clarity into logic (IMHO)

one more case - have if-not instead of unless (more clarity)

point is - unless wery "rare" word and adding more mental overhead for non-native speakers, also, used 20 times less in the world, comparing to if not

image

image

Why not-eq instead of neq ?

not-eq seems more readable for me, comparing to neq

it require less mental parsing, especially for non native speakers and new developers.


Preconditions:

glimmerjs/glimmer-vm#1240 (comment)

Refs:

#560 (comment)
#560 (comment)

cc @rwjblue @pzuraq

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