Skip to content

Add ArrayList.sort #3917

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

Closed
wants to merge 1 commit into from
Closed

Add ArrayList.sort #3917

wants to merge 1 commit into from

Conversation

data-man
Copy link
Contributor

No description provided.

@andrewrk
Copy link
Member

I don't think we need helper functions in ArrayList for things that can generally be done on slices.

list.sort(std.sort.asc(i32))

vs

std.sort.sort(list.toSlice(), std.sort.asc(i32))

we don't need to have all the std.mem functions in the ArrayList namespace either.

@andrewrk
Copy link
Member

I also removed count and the iterator API in c3d8b1f, and closed #3037 for similar reasons.

@andrewrk andrewrk closed this Dec 16, 2019
@data-man
Copy link
Contributor Author

I also removed count and the iterator API

Yes, it's sadly.
I propose revert it, and to add more iterators to std.
E.g. reversedIterator.
It'll allow to implement a flexible library for functional programming.

@data-man data-man deleted the arraylist_sort branch December 17, 2019 19:42
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.

2 participants