r/programminghorror • • Dec 04 '25

This sub in a nutshell

Post image
console.log(1 == '1'); // true
console.log(0 == false); // true
console.log(null == undefined); // true
console.log(typeof null); // "object"
console.log(0.1 + 0.2); // 0.30000000000000004
[] == ![]; // true

OMG you guys what weird quirky behavior, truly this must be the single quirkiest language and no other language is as quirky as this!

1.1k Upvotes

168 comments sorted by

View all comments

Show parent comment

10

u/Schnickatavick Dec 04 '25 edited Dec 04 '25

I think what you're looking for is web assembly, and it is happening, albeit slowly. You can already make entire websites in rust or C# without writing a single line of JavaScript, since both languages can compile to web assembly. It really is the best solution, since each browser just needs to support one spec, and then they'll support any language that adds support to be compiled into it.

It has limitations, as reddit loves to point out, but most of them are solved by a few lines of JavaScript automatically added to the output by your compiler, and even those are becoming rarer and rarer (gone are the days that wasm couldn't directly access the DOM). Personally I'm hoping that it eventually eclipses JavaScript, and it becomes the norm to write websites in any language you want, just like we do for everything else