Absolutely not. The stable version is important because of the guarantee of
stability. There is no guarantee with the others. The might be using the
same algorithm currently, but there is no guarantee that this will always
be the case. We may find a faster solution that is not stable and are free
to make the switch at any time.

Rick

On Thu, Apr 9, 2020 at 8:42 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at>
wrote:

> There are four sort methods according to rexxref.pdf, 5.3.6.33 - 5.3.6.36:
>
>    - sort
>    - sortWith
>    - stableSort
>    - stableSortWith
>
> The sort* methods have the following documentation in common:
>
> Sorts the Array of Comparable items into ascending order using an
> algorithm that* is not guaranteed to*
> *be stable*, and returns the sorted Array.
>
> The stableSort* methods have the following documentation in common:
>
> Sorts the Array of Comparable items into ascending order using *a stable
> Mergesort algorithm*, and
> returns the sorted Array.
>
> AFAIK it turned out to be the case that the mergesort algorithm was faster
> (or at least as fast) as the original (unstable) sort algorithm, such that
> sort* now also employ the stable mergesort algorithm.
>
> Therefore
>
>    - the documentation needs to be corrected, if possible dropping the
>    term "stable" as this makes newcomers unsecure (does that really mean that
>    the sorting order may be changed?) who do not know the meaning of "stable"
>    in the context of sort algorithms,
>
>    - the stableSort* versions have become useless and should be either
>    marked prominently as deprecated in the documentation or left out
>    altogether (but leaving it in the interpreter for backlevel support).
>
> What do you think?
>
> ---rony
>
>
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to