Backward compatibility and not seeing the future. Some decisions are taken at one point in time, then a new use case show up, then a new paradigm evolve, then… etc etc.
It’s really the same thing that holds back a lot of languages and libraries. And even when replacement shows up, old habits from devs and old projects maintenance keep all these things well alive too.
“I want predictable behavior for all possible inputs” is hardly a requirement that requires a fortune teller to see coming.
JavaScript has a particularly insane stdlib because this language wasn’t designed, it is a botched chimera with deformities so severe it should have died 15 times over but people just won’t let it.
Then to rub salt in the wound this horrific mess became the most popular language in the world by virtue of being the only language for the most popular application ecosystem in the world (the web). So the cancer is spreading and now you can find JavaScript in servers and fucking desktop environments and now your windows start menu takes five seconds to load because fucking react.js is loading the 75 polyfills necessary to make up for the fact that JS’s “standard” library looks like it was designed by 3 cocained-up gibbons.
early js/html liked to do something in all cases instead of throwing or whatever. I think it’s mostly just a collection of them trying to do something smart on nonsense input and not being consistent about it.
side note, I’m so excited for Temporal, some browsers already support it and you can polyfill for the rest.
Oh that’s not nearly the only thing javascript fucks up about their Date() implementation. https://jsdate.wtf/
I … this seems like a std library made to troll you. Is there a (good) reason it is like that?
Backward compatibility and not seeing the future. Some decisions are taken at one point in time, then a new use case show up, then a new paradigm evolve, then… etc etc.
It’s really the same thing that holds back a lot of languages and libraries. And even when replacement shows up, old habits from devs and old projects maintenance keep all these things well alive too.
“I want predictable behavior for all possible inputs” is hardly a requirement that requires a fortune teller to see coming.
JavaScript has a particularly insane stdlib because this language wasn’t designed, it is a botched chimera with deformities so severe it should have died 15 times over but people just won’t let it.
Then to rub salt in the wound this horrific mess became the most popular language in the world by virtue of being the only language for the most popular application ecosystem in the world (the web). So the cancer is spreading and now you can find JavaScript in servers and fucking desktop environments and now your windows start menu takes five seconds to load because fucking react.js is loading the 75 polyfills necessary to make up for the fact that JS’s “standard” library looks like it was designed by 3 cocained-up gibbons.
early js/html liked to do something in all cases instead of throwing or whatever. I think it’s mostly just a collection of them trying to do something smart on nonsense input and not being consistent about it.
side note, I’m so excited for Temporal, some browsers already support it and you can polyfill for the rest.
No.
I can only imagine it wasn’t planned properly, cuz that’s so many quiet behaviours without good parsing errors
See also: https://www.destroyallsoftware.com/talks/wat