Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Equality Operators to Templates #560

Open
wants to merge 2 commits into
base: master
from

Conversation

@cibernox
Copy link
Contributor

cibernox commented Dec 8, 2019

Extracted from RFC #388

Rendered

cibernox added 2 commits Dec 8, 2019
@balinterdi

This comment has been minimized.

Copy link

balinterdi commented Dec 8, 2019

I'll admit it's not very constructive feedback, but can we call it not-eq instead of neq?

@cibernox

This comment has been minimized.

Copy link
Contributor Author

cibernox commented Dec 8, 2019

@balinterdi It's one of the points in the Unresolved questions section. Let's someone from core chime in and arguments the reasons to prefer {{neq}} instead of {{not-eq}}. If there was none, I'd also prefer {{not-eq}} because the transition from ember-truth-helpers would be super easy.

Copy link
Member

Turbo87 left a comment

yes, please! 🙏

- If an app already use `ember-truth-helpers`, the `{{eq}}` helper will conflict with the one proposed here. How do we
update `ember-truth-helpers` to make sure the helper of the same name doesn't collide with the built-in one?
- The inequality helper proposed in this RFC is `{{neq}}` while the one in ember-truth-helpers is `{{not-eq}}`. It is
worth considering the benefits that keeping the same name might have in helping apps and addon migrate to the built-in helper.

This comment has been minimized.

Copy link
@Turbo87

Turbo87 Dec 18, 2019

Member

this could easily be migrated using a template codemod, so probably not much of an issue in reality :)

This comment has been minimized.

Copy link
@cibernox

cibernox Dec 18, 2019

Author Contributor

Sure, but nothing beats not having to change anything 😄

This comment has been minimized.

Copy link
@balinterdi

balinterdi Dec 19, 2019

@Turbo87 And you have to admit: neq looks way worse than not-eq.

This comment has been minimized.

Copy link
@Turbo87

Turbo87 Dec 19, 2019

Member

I mean, one could argue that (not (eq foo bar)) is not much longer than (not-eq foo bar) 😅

This comment has been minimized.

Copy link
@balinterdi

balinterdi Dec 19, 2019

Fair enough, I'm happy with (not (eq ... )), too. I don't think gaining 3 characters (neq vs. not-eq) justifies introducing a so-far unseen neq but I might just have a visceral reaction to neq that I have to overcome.

@Driezzz

This comment has been minimized.

Copy link

Driezzz commented Jan 2, 2020

Why not add all truth-helpers, but just these two?

@Turbo87

This comment has been minimized.

Copy link
Member

Turbo87 commented Jan 2, 2020

@Driezzz because these are the most uncontroversial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.