News for hackers. Stuff that matters.
Re:The Curious Case of JavaScript’s `sort` by lotsoflumens on Wednesday April 13, 2016 @11:05AM (#11488752)
Yes - even Typescript, when arrays are given types, doesn't fix it even though it could be done easily.

var x : number[] // should compile: x.sort(function(a,b) { return a - b; })

var y : string[] // should compile: y.sort()

The reason that this isn't done is due to a misplaced ideology about "typescript is just javascript" - or some similar nonsense.

The bigger problem here is that we are using tools that are designed by a committee, and we have almost no hope of getting this fixed.

There are no comments on this comment yet.