News for hackers. Stuff that matters.
Re:Blessed Are the JavaScript Developers by naikrovek on Monday August 31, 2020 @06:25PM (#24336512)
> I'm curious what your intuitive default strategy is to sort the following array

It doesn't make sense to sort an array containing different types at all so why is this even allowed at all?

JavaScript will forever be a very successful toy because of things like this. Types are important, and the tweet begins to expose why.

Re:Blessed Are the JavaScript Developers by danShumway on Monday August 31, 2020 @07:26PM (#24336929)
> JavaScript will forever be a very successful toy because of things like this. Types are important, and the tweet begins to expose why.

The "everything should be strongly typed" argument is not one that I'm necessarily unsympathetic to, but I also just don't feel like it's relevant here.

Javascript isn't strongly typed. What did you expect the spec authors to do, break the entire web just so that they could have a better `sort` method? They built a decent algorithm given the language and paradigms that they were building on.

Soon everyone who hates Javascript will be able to use Rust/C/C# targetting WASM, and hopefully these pointless "it's a toy language" debates will calm down once that option goes more mainstream.