Skip to content

Add ArrayList.sort - #3917

Closed
data-man wants to merge 1 commit into
ziglang:masterfrom
data-man:arraylist_sort
Closed

Add ArrayList.sort#3917
data-man wants to merge 1 commit into
ziglang:masterfrom
data-man:arraylist_sort

Conversation

@data-man

Copy link
Copy Markdown
Contributor

No description provided.

@andrewrk

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@data-man

Copy link
Copy Markdown
ContributorAuthor

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 freeto 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

@data-man@andrewrk