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

Refactor sort methods to #sort and #unstable_sort #11029

Merged

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Jul 27, 2021

This is a follow-up on #10163 refactoring the search API from a single method with a parameter for choosing stability to different methods #sort and #unstable_sort (see #6057 (comment)).

  • sort(stable: true) => sort
  • sort(stable: false) => unstable_sort

Proper API documentation is still missing, but I'd like to solve that with a Sortable module. That might still need some ironing out. This first iteration is just for settling down the API.

@straight-shoota straight-shoota force-pushed the refactor/unstable_sort branch from 1b79cef to fe2564a Compare July 27, 2021 13:53
@vlazar
Copy link
Contributor

vlazar commented Jul 27, 2021

@straight-shoota Typo in PR description: search(stable: false) => unstable_search. Should be sort.

Having an unstable search would be an interesting design choice for sure 😉

@straight-shoota
Copy link
Member Author

Haha, thanks for pointing out. I had a really weird feeling while putting that down, but was apparently to blind to recognize what's wrong.

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @straight-shoota 🙏

@straight-shoota straight-shoota added this to the 1.2.0 milestone Aug 2, 2021
@straight-shoota straight-shoota changed the title Refactor to #sort and #unstable_sort Refactor sort methods to #sort and #unstable_sort Aug 3, 2021
@straight-shoota straight-shoota merged commit 42ce885 into crystal-lang:master Aug 3, 2021
@straight-shoota straight-shoota deleted the refactor/unstable_sort branch August 3, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants