stable sort proposal

kai zhu kaizhu256 at gmail.com
Wed Sep 12 03:02:50 UTC 2018


+1

it would avoid stable-sort workarounds like this [1], [2] for javascript-database implementations.

[1] testable, deterministic, stable-sort workaround for querying rows from db-lite
https://github.com/kaizhu256/node-db-lite/blob/2018.4.23/lib.db.js#L1010 <https://github.com/kaizhu256/node-db-lite/blob/2018.4.23/lib.db.js#L1010>

[2] accompanying integration-tests to ensure reproducible, sorted db-queries
https://github.com/kaizhu256/node-db-lite/blob/2018.4.23/test.js#L64 <https://github.com/kaizhu256/node-db-lite/blob/2018.4.23/test.js#L64>

kai zhu
kaizhu256 at gmail.com



> On 12 Sep 2018, at 5:09 AM, 森建 <moriken at kimamass.com> wrote:
> 
> `Array#sort` is stable in Chrome 70.
> https://twitter.com/mathias/status/1036626116654637057
> 
> All modern browsers (and IE 11) have stable sort with `Array#sort`. Would you like to mention `Array#sort` must be a stable sort on specification (>=ES2019)?
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180912/1356405d/attachment.html>


More information about the es-discuss mailing list