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

Add a Sequence.sort() method? #825

Closed
ChayimFriedman2 opened this issue Oct 11, 2020 · 2 comments
Closed

Add a Sequence.sort() method? #825

ChayimFriedman2 opened this issue Oct 11, 2020 · 2 comments

Comments

@ChayimFriedman2
Copy link
Contributor

ChayimFriedman2 commented Oct 11, 2020

Sorting is really required. We can have a method in Sequence that sorts the sequence, or a method in List that sorts it in-place, or both (both!)

There are number of design choices:

  1. Should the sort be stable? (We can provide both, but that seems unnecessary. I think most scripting languages just have stable sort - JS, Python, ...)
  2. Should we provide in-place sort (possible only for lists), or not in-place (can be general in Sequence)? As I said, it seems reasonable to have both (Python does that - it has both list.sort() (in-place) and sorted() (not)).
@ruby0x1
Copy link
Member

ruby0x1 commented Oct 11, 2020

there's some wip stuff here already. #802

@ChayimFriedman2
Copy link
Contributor Author

I haven't search the PRs, just the issues 😄

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

No branches or pull requests

2 participants