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

Name & scope of Tuple.prototype.* methods #227

Closed
rricard opened this issue May 6, 2021 · 4 comments
Closed

Name & scope of Tuple.prototype.* methods #227

rricard opened this issue May 6, 2021 · 4 comments

Comments

@rricard
Copy link
Member

rricard commented May 6, 2021

As part of the stage 1 Change Array by Copy we are proposing changes to Tuple.prototype.* methods:

If you do have opinions on the naming and methods available on Tuple, please go comment in those threads as we intend to centralize discussion there.

Thank you!

@rricard rricard added this to the stage 3 milestone May 6, 2021
@tc39 tc39 locked and limited conversation to collaborators May 6, 2021
@rricard
Copy link
Member Author

rricard commented May 6, 2021

Locked in favor of discussing in tc39/proposal-change-array-by-copy#10 and tc39/proposal-change-array-by-copy#27

@rricard
Copy link
Member Author

rricard commented Jun 21, 2021

As it stands, we should implement the following (non-final) naming scheme to follow tc39/proposal-change-array-by-copy#28:

  • Tuple.prototype.withFilled(value, start, end) -> Tuple
  • Tuple.prototype.withCopiedWithin(copiedTarget, start, end) -> Tuple
  • Tuple.prototype.withPopped() -> Tuple
  • Tuple.prototype.withPushed(values...) -> Tuple
  • Tuple.prototype.withReversed() -> Tuple
  • Tuple.prototype.withShifted() -> Tuple
  • Tuple.prototype.withSorted(compareFn) -> Tuple
  • Tuple.prototype.withSpliced(start, deleteCount, ...items) -> Tuple
  • Tuple.prototype.withUnshifted(...values) -> Tuple
  • Tuple.prototype.withAt(index, value) -> Tuple

@rricard
Copy link
Member Author

rricard commented Aug 31, 2021

We now have to take in account the following reduction of scope: tc39/proposal-change-array-by-copy#27

This will result on the following Tuple prototype:

  • Tuple.prototype.withReversed() -> Tuple
  • Tuple.prototype.withSorted(compareFn) -> Tuple
  • Tuple.prototype.withSpliced(start, deleteCount, ...items) -> Tuple
  • Tuple.prototype.withAt(index, value) -> Tuple

@rricard rricard self-assigned this Aug 31, 2021
@rricard
Copy link
Member Author

rricard commented Jul 8, 2022

Change array by copy went to stage 3 with an agreed scope. Tuple is going to follow this new scope. This is already in the spec text.

@rricard rricard closed this as completed Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant