-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Normative: Add getOrInsert and getOrInsertComputed methods for Map and WeakMap #3740
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
base: main
Are you sure you want to change the base?
Conversation
bakkot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit: we mostly (although I guess not uniformly) use lowercase for section IDs.
Otherwise LGTM.
Sorry, I was unable to apply the suggested changes directly from GitHub.
spec.html
Outdated
|
|
||
| <emu-clause id="sec-map.prototype.getorinsert"> | ||
| <h1>Map.prototype.getOrInsert ( _key_, _value_ )</h1> | ||
| <p>When the getOrInsert method is called the following steps are taken:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is old phrasing.
| <p>When the getOrInsert method is called the following steps are taken:</p> | |
| <p>This method performs the following steps when called:</p> |
Likewise for the other 3 occurrences.
From the Upsert proposal, I'm hoping to bring this for Stage 4 at an upcoming plenary.