chapel
chapel copied to clipboard
Review the Sort module name for stabilization
We suspect this will probably be the name we use for it, but it's worth actually discussing and deciding that, especially since we've talked about the module recently in blogs.
If we stabilize it independent of the contents of the module, we will want to make sure to mark the symbols within it unstable until we've had a chance to review
I like the current name, myself. Short, sweet, straightforward. Sorting is the other main option that comes to mind, but I don't know if the incremental benefit is worth the pain of switching.
In an offline discussion today, we discussed keeping the module name of Sort, pending a review of other languages
I took a quick look at what the "Sort" module looks like in other languages
- Python:
sortedis an always available function, some types like list have asortmutating method - C++: The header
algorithmprovidesstd::sort, which mutates the original array - Rust:
sortis a mutating method on a vector - Julia:
sortis an always available function that returns a new sorted array - Swift:
.sort()is a mutating method on an array/list
It seems these languages all provide sort by default, without needing to import a module.
@jabraham17 - do these other languages have an equivalent to a module name associated with sort even though it is included by default?
do these other languages have an equivalent to a module name associated with sort even though it is included by default?
Some of them have modules, but the majority have sort methods of some kind.
- Python: no,
sortedis a builtin function andsortis a method on builtin types - C++: yes,
std::sortcomes fromalgorithm - Rust: kinda,
sortis a builtin method, but there are sort crates. Two I found wheresort(insertion sort, quick sort, etc) andsorting(which is a joke-sort module). - Julia: Although
sortis available by default, I think its in a module calledSort. (I could be wrong, I am not very familiar with Julia) - Swift:
sortis a method on arrays
This has been resolved, we are keeping the name Sort