Skip to content

Normalize MS map_ BIF names and document grammar.#3

Open
christhekeele wants to merge 1 commit into
sverker:sverker/erts/match-spec-map-bifsfrom
christhekeele:map-put-remove-in-matchspecs
Open

Normalize MS map_ BIF names and document grammar.#3
christhekeele wants to merge 1 commit into
sverker:sverker/erts/match-spec-map-bifsfrom
christhekeele:map-put-remove-in-matchspecs

Conversation

@christhekeele

@christhekeele christhekeele commented Feb 20, 2024

Copy link
Copy Markdown

Picked up and played with erlang#7326 a little @sverker, here's a PR form of some of my thoughts.

  • Renames maps_put and maps_remove to map_put and map_remove

    The reasoning being:

    • The pre-existing map_get call allowed in matchspecs today is singular
    • This is to mirror the auto-imported map_get BIF in the erlang module; in the future if map put/remove BIFs are added to erlang they would be named similarly too
  • Allows map_put and map_remove in trace matchspec bodies

    • I think we may as well allow modification of maps used in tracing; ex. adding some sort of metadata into a map being used as an emitted message in certain trace patterns
  • Separates these functions from action functions in both documentation and implementation

  • Updates the matchspec grammar docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant