Re: Proposal: rename Data.List.NonEmpty.sortWith to sortOn for consistency
sortWith and sortOn have different implementations (specifically, they
make a different tradeoff regarding performance – sortWith is faster for
cheap functions, sortOn is faster for expensive functions).
I'm +1 on adding sortOn, −1 on renaming sortWith to sortOn (as it would
be very confusing to have a Data.List.NonEmpty.sortOn that doesn't match
Data.List.sortOn), and −0.1 on removing sortWith.
On 05/18/2017 07:21 PM, Ömer Sinan Ağacan wrote:
> Proposal: Introduce `Data.List.NonEmpty.sortOn` for
> `Data.List.NonEmpty.sortWith` and deprecate `sortWith`.
> Motivation: Data.List.NonEmpty API is very similar to Data.List, except this
> same function is called `sortOn` in `Data.List`. I think for consistency it'd
> good to rename `sortWith` to `sortOn`.
> Why not rename `sortOn` to `sortWith`? I think `Data.List` is much more widely
> used than `Data.List.NonEmpty`, so renaming `sortWith` would lead to much less
> deprecation warnings.
> Libraries mailing list
> [hidden email] > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries