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

[formulas] Use in for scoping, not has() checks #1030

Open
LeaVerou opened this issue Jul 31, 2024 · 0 comments
Open

[formulas] Use in for scoping, not has() checks #1030

LeaVerou opened this issue Jul 31, 2024 · 0 comments
Labels
breaking change Effort: low Easy to address issues, ideal for first time contributors! Priority: medium Status: blocked Waiting for something else before progress can be made Topic: Formulas

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Jul 31, 2024

Currently, the in operator is mapped to the has() function. However, that's a bit of a waste for such a nice short operator.

I think it would be much better used for scope() which (once implemented properly) is a very powerful concept and worth exposing with an operator. Currently marking as blocked, since we're not there yet, but we should probably deprecate the in operator already, to prepare.

One downside is that the order of operands would be the reverse of what it is with the dot operator, e.g. it's student.name but name in student. But I think that's okay, since it's weaker than the dot operator (or at least it should be — again, bugs).

@LeaVerou LeaVerou added Effort: low Easy to address issues, ideal for first time contributors! breaking change Status: 4. Ready to implement We know how to implement this, but who will do it? Topic: Formulas Priority: medium Status: blocked Waiting for something else before progress can be made and removed Status: 4. Ready to implement We know how to implement this, but who will do it? labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Effort: low Easy to address issues, ideal for first time contributors! Priority: medium Status: blocked Waiting for something else before progress can be made Topic: Formulas
Projects
None yet
Development

No branches or pull requests

1 participant