-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 sort methods to Slice #7597
Add sort methods to Slice #7597
Conversation
You can now rebase against master :-) |
98e769f
to
eb98a1d
Compare
What's the purpose of |
Is it possible to move |
@yxhuvud Yes that should work. The exclamation methods need a tiny adjustment, but But I'm not sure if this module would be much of a benefit. Duplicating the code for sort methods is one thing, but that's not really an issue. The question is, is having a |
@straight-shoota |
@Maroo-b Your changes (the My thoughts:
|
@asterite thank you for the feedback! Sure I agree, I'll move those methods to |
081681b
to
151ffea
Compare
IMHO the name I'm still not convinced that we need a separate namespace for these methods anyway, but if we do, I'd call it |
The way I imagine it, the |
@straight-shoota @asterite just to confirm, should I move the sort logic to |
It's fine, Slice is a struct. And yes, please move the methods to Slice. Thank you! |
Creating a struct is basically free of cost. I'd suggest to add |
@straight-shoota but we'd get back to #5173 (comment) ?
|
151ffea
to
2d8fb36
Compare
Looks great! I'd prefer to put the sort methods in a separate file (e.g. |
722218f
to
d6d8a5e
Compare
@straight-shoota thank you for the reviews, the PR was updated as suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
What about moving the specs to |
@bew it's an option, but I prefer to keep |
d6d8a5e
to
2d58ecc
Compare
2d58ecc
to
a7ef60a
Compare
a7ef60a
to
93ebc49
Compare
PR updated to resolve conflicts and apply changes from this PR: #7639 |
Seems like GTG 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Maroo-b 🙏
This PR depends on this fix: #7591
I extracted the sort logic from
Array
to a module. If this approach is approved, I'll try to add some docs for the module (or if someone has more skills with writing docs :) )