-
Notifications
You must be signed in to change notification settings - Fork 17
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
Change the ternary operator to if..then..else
#34
Comments
if ... then ... else
if..then..else
This also solves the incorrect precedence of the ternary operator that is present in filtrex v2, see this SO post. |
Add back |
Why not support both - personally I prefer ternary operators? |
Hey Mike, |
Many languages, including Python and CoffeeScript, use keywords
if
andelse
instead of the ternary operator?:
. This approach is better aligned with the goals of filtrex. In particular, the CoffeeScript version (if a then b else c
) is very close to natural language which makes it layman-friendly.This change is scheduled as a breaking change in v3.0.0. Any discussion is welcome.
The text was updated successfully, but these errors were encountered: