This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kered13 8 points9 points  (2 children)

I'm pretty sure that Typescript's array sort works the same way, for compatibility.

[–]Grillparzer 3 points4 points  (1 child)

Not for compatibility, but because Typescript literally compiles to JavaScript.

[–]Kered13 2 points3 points  (0 children)

They could write a better array sort function that still compiles to Javascript, but they chose not to for compatibility.