-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add matchspec BIFs maps_put and maps_remove #7326
base: master
Are you sure you want to change the base?
Conversation
corresponding to maps:put/3 and maps:remove/2.
CT Test ResultsNo tests were run for this PR. This is either because the build failed, or the PR is based on a branch without GH actions tests configured. Results for commit e3cdf6c To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
Could it be that fun2ms translates the map update syntax into |
It could I suppose. I'm not familiar with the fun2ms code though. |
Vote for
|
A couple of thoughts:
|
Yes maybe. I called them
Maybe. I did this as a quick proof of concept without too much thought of the naming.
I don't remember why I added them to ms_transform:action_function/1. They are not action functions in the sense of side effects. |
corresponding to maps:put/3 and maps:remove/2.
This is a quick attempt to fix #7309.
The map syntax to update keys cannot simply be used as
Map#{key => value}
would be translated by fun2ms to something like'$1'#{key => value}
which is not valid Erlang syntax. Instead use the match spec syntax to call BIFs.ToDo: Test and documentation.