This repository was archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
In the parser, Assign should not be an Expression #870
Milestone
Comments
Allowing assignments makes many things, including dirty checking much harder because an expression that was expected to be idempotent would now have side-effects which we are not ready to handle. |
From looking at the code, a little while back, I came up with a grammar; here is an excerpt from here that is relevant to this issue:
In the source code, the
Is this what you have in mind? |
Sounds reasonable. I am a little concerned that such a change will complicate the parser. It is true that you can't watch assignments, but you will get an error about that during AST conversion. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, assignments (the Assign class) is a subclass of Expression. But this implies that you can watch assignments, but you can't.
Assignments should not be allows in watches (e.g. only in places where we pass them to Scope.apply()).
The text was updated successfully, but these errors were encountered: