-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Unintuitive priority of or
?
#629
Comments
Perhaps there are some good arguments for that decision. One can't find such information in the nix manual... (but the priority order is documented in there clearly) |
Broken in 62dca7c; the tricky thing is that it depends on nix version. Explanation: NixOS/nix#629
I don't think there's sufficient motivation to keep an open ticket for this 🤷 |
It belongs on a "language quirks" inventor page :-) |
😄 the formulation made me recall http://lambda-the-ultimate.org |
I think we could make the parentheses in the third operand semi-mandatory, by emitting a warning if the ie don't warn for the unambiguous case: (set.attribute or function) param EDIT: at first I thought this looked unambiguous, but I've changed my mind: set.attribute or (function) param
Fwiw, there's no |
Sounds like a good idea, from UX perspective at least. I think it will be rare to use |
A while ago I was taken unawares by the fact that the operator priority is higher for
or
than for function application. That is strognly against my functional-programming intuition of application always binding the strongest. Example of the current state:I'm aware that changing such things is not to be taken lightly – maybe in nix-1.10 it might be bearable? (Unless you actually prefer the current priority.)
The text was updated successfully, but these errors were encountered: