tc39 / proposal-upsert

ECMAScript Proposal, specs, and reference implementation for Map.prototype.upsert
https://tc39.es/proposal-upsert/
MIT License
202 stars 14 forks source link

New API with getOrInsert and getOrInsertComputed #58

Closed dminor closed 1 month ago

dminor commented 1 month ago

This updates the design to match what was presented to committee at the October 2024 plenary. I am becoming champion of the proposal with the students at the University of Bergen as co-authors, and the previous champion and author are noted as no longer actively involved in the proposal.

The naming of the methods is still up for discussion, I plan to open an issue to discuss options once this pull request is merged.

dminor commented 1 month ago

WFM. I'm not gonna do a review of the spec text until after Stage 2. I would like to see an API name bikeshedding issue at some point though. There's lots of prior art for us to take naming inspiration from and hopefully make it intuitive/unsurprising for as wide a group as possible.

Thanks. I was planning to open an issue to bikeshed the names as soon as this is merged.