Skip to content
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

Update Set methods proposal #1150

Merged
merged 11 commits into from Dec 11, 2022
Merged

Update Set methods proposal #1150

merged 11 commits into from Dec 11, 2022

Conversation

zloirock
Copy link
Owner

@zloirock zloirock commented Nov 29, 2022

  • Set methods proposal:
    • Methods:
      • Set.prototype.intersection
      • Set.prototype.union
      • Set.prototype.difference
      • Set.prototype.symmetricDifference
      • Set.prototype.isSubsetOf
      • Set.prototype.isSupersetOf
      • Set.prototype.isDisjointFrom
    • Moved to Stage 3, November 2022 TC39 meeting
    • Reimplemented with new semantics:
      • Optimized performance (iteration over lowest set)
      • Accepted only Set-like objects as an argument, not all iterables
      • Accepted only Sets as this, no @@species support, and other minor changes
    • Added /actual/ entries, unconditional forced replacement changed to feature detection
    • For avoiding breaking changes:
      • New versions of methods are implemented as new modules and available in new entries or entries where old versions of methods were not available before (like /actual/ namespace)
      • In entries where they were available before (like /full/ namespace), those methods are available with fallbacks to old semantics (in addition to Set-like, they accept iterable objects). This behavior will be removed from the next major release

cc @bakkot

@zloirock zloirock force-pushed the set-methods branch 2 times, most recently from 0107f14 to 8938e6e Compare December 2, 2022 19:36
@zloirock zloirock force-pushed the set-methods branch 4 times, most recently from 430f198 to 9dee7f2 Compare December 10, 2022 06:15
@zloirock zloirock merged commit 541c979 into master Dec 11, 2022
@zloirock zloirock deleted the set-methods branch December 11, 2022 06:21
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.

None yet

3 participants