4 ms·
Exhibit $n why ECMAScript is not a well-designed language at its core. It ought to be as simple as the Lua core language but it isn't (the object type was a goo
by 2ion 7y ago
Exhibit $n why ECMAScript is not a well-designed language at its core. It ought to be as simple as the Lua core language but it isn't (the object type was a good start but then stopped being one). Boltons after boltons. For things as simple as this.
- snek 7y agolua has s:gsub, which is basically the same thing... or are you saying js should've popped into existence with thousands of stdlib functions?
- mschuster91 7y agoPHP at least is sane enough to provide the C stdlib, dito for Java. JavaScript... well, remember left-pad? That's what happens when people are forced to re invent the wheels.
- krapp 7y agoleft-pad wasn't a fault of the language, but the modern javascript ecosystem and its tools. Javascript development got along fine for years when all anyone had was JQuery plugins, no one was complaining about the lack of a C style stdlib, and no single point of failure for the entire ecosystem created an internet-wide catastrophe every week.
- ben-schaaf 7y agoEveryone complained about the lack of a C style stdlib. That's why jQuery was written and everyone used it.
- krapp 7y agoPeople complained about incompatible versions of the DOM between IE and everyone else, and about how awkward AJAX and DOM manipulation was, and those are the problems JQuery solved. That's providing a common API and mostly forcing Microsoft to follow spec, not a "C style stdlib," though. I don't think many people were upset that javascript didn't natively support, say, proper integers or static types or (ugh) "classes" or what have you, at least not until people started wanting to use javascript outside of its intended purpose.
- wruza 7y agoYou don’t count to thousand looking for: - replace all occurences, - remove n-th element, - binary search for an item, - sort an array without implicit string coercion in a good stdlib. Lua is explicitly minimalist, so it is not a good example here.
- bendiksolheim 7y agoI don’t understand your criticism. Are you criticising JavaScript for getting a feature you would assume it already had?