-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Evaluation of subexpressions in Any.of
#419
Comments
Somewhat relatedly: evaluation of subexpressions in |
My first impression is that the answer to 1 should be "no", and the expressions should be evaluated when the definition is evaluated. But that would implement that the environment of a function argument's annotation doesn't include earlier arguments. I can't remember whether that feature of the current implementaation is important and intentional for some purpose, or if it's just an artifact of the current expansion:
|
In particular, do not *include* the annotation's predicate if unchecked, which means the predicate is neither evaluated nor even expanded. I'm not sure whether this is intended, but it seems consistent with how other forms behave. This may deserve more discussion at #419.
After looking into this, I concluded that the answer to 1 needs to be "no". Supporting that answer required a refinement to the low-level binding protocol, which is implemented in 9864aef. The intended behavior is now documented to a useful degree, but more precision is needed (probably in the new "Rhombus Language Model" document as it fills out). |
I have two questions:
Any.of
have a short-circuiting behavior?The following program showcases the difference in behavior.
The text was updated successfully, but these errors were encountered: