-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Added stable sub-feature for Array.prototype.sort. #4559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Pimm and welcome to BCD! Thank you for opening this PR. I looked into this a little bit and had two suggestions before we merge. Thanks again!
It appears Edge support is right around the corner. We can change Edge's version when it lands. See 4b00797. This commit can be squashed if merged.
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you! 🎉
According to the current ECMAScript spec (and since version 10),
Array.prototype.sortmust be stable.It seems sorting has been stable in Firefox since version 3 (bugzilla). I assume this means it has been in Firefox for Android since its birth.
Sorting is currently stable in V8, and according to v8.dev it has landed in Chrome 70 and Node.js 12. However, it seems Node.js 11 includes V8 7.0 (changelog of Node.js). So it might have landed as early as Node.js 11.
Sorting is currently stable in Chakra Core (PR #5724 in ChakraCore), but I can't find in which version of Edge this landed.
According to a post on StackOverflow, sorting has been stable in Opera since 10, Safari since 4, and IE since 6, but I have no other sources to back up these claims.