-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requeststdlibThis issue is about the standard libraryThis issue is about the standard library
Description
sorting arrays is one of those things that seems trivial, but if you don't have a builtin way to do it, it's absolute ass. nobody wants to implement a sorting algorithm from scratch, especially not in a relatively minimal, purely interpreted scripting language.
I'd say:
- numbers are obvious
- strings get sorted by character value (e.g.
["-", "5head", "Aardvark", "Axe", "age", "apple"])
if equal up until one of two strings ends, the shorter one gets sorted first (e.g.["", "lig", "ligma", "ligma balls"])
hit me up if you need help implementing an algorithm for this. a simple dual-pass std::sort should work. I'd have to look at what options the dart stdlib gives us. - lists are handled like strings, except instead of "character value", items get compared to each other.
- maps aren't sorted and thus can't be analyzed the same way. maybe just length? or maybe we just don't let the user sort a list of dictionaries. It doesn't really make sense to do that.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requeststdlibThis issue is about the standard libraryThis issue is about the standard library