-
Notifications
You must be signed in to change notification settings - Fork 482
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
Add "not" boolean operator #275
Add "not" boolean operator #275
Conversation
It's look nice! Very helpfull |
Hi, is there anything stopping this PR from being merged? I was just about to create an issue on this too and would find it very useful. 👍 |
This would be a great addition! |
Would love this feature! |
+1 |
We could really use this feature!!! +1 |
I've read that three times now and the second one is significantly more understandable to me. More succinct, less complex, less mental effort required (all conditions must be false, rather than "not any condition which is true"). The first one may seem more readable and understandable to you currently, but thats not as important as it being readable by others (and you) later. |
Hi, I'm the original creator of this PR, just under a different account! 😄 @StingyJack I agree with you that the given example frames the need for a NOT operator poorly by doing so in the context of an any vs. all scenario. The intended value here is primarily in the following statement:
Broadly speaking, being forced to manually negate a condition (without a NOT operator) which is more clearly expressed in either its positive/negative form, especially if it's deeply nested, can get messy. |
@andrewjleung nice seeing you 😆 if this PR merges by next year, I'll buy you a beer! |
any update on this feature PR please ? |
@andrewjleung I'm working with @CacheControl to help maintain this project now. I've been a bit out of pocket today but I hope to get a chance to review, test, and merge this PR before the weekend. Thanks for putting this together, and sorry about the wait. |
I've had difficulty expressing certain rules in a readable way without the ability to negate conditions.
For instance if I wanted to create a rule saying "trigger an event when there is not any condition which is true," I would instead have to express this as "trigger an event when all conditions are false." This means that I would have to write each condition as its logical negation, which potentially affects the readability of the condition.
These changes add in a new
not
boolean operator alongsideall
andany
which negates the result of whatever single condition is nested inside it.I believe this addresses issue #269.