We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This would be a syntactic sugar that would possibly make it nicer to modify state fields (if it is a record, which is mostly the case).
record r = {val : int} record state = {x : int, y : r} stateful function f() = state.x = 21 state.y.val = 37
which would desugar to
put(state{x = 21}) put(state{y = state.y{val = 37}})
and ideally to
put(state{x = 21, y = state.y{val = 37}})
The text was updated successfully, but these errors were encountered:
Note that state modifications are still explicit, as one needs to refer to the state as lvalue.
state
Sorry, something went wrong.
+1
I thought the compiler optimizes multiple puts into one at any rate.
oh yeah, I like this one! :)
No branches or pull requests
This would be a syntactic sugar that would possibly make it nicer to modify state fields (if it is a record, which is mostly the case).
which would desugar to
and ideally to
The text was updated successfully, but these errors were encountered: