3 ms·
A lot more of the ES2015+ features are supported by browsers today than people seem to think as well. A large number of people still think of things like arrow
by WorldMaker 7y ago
A lot more of the ES2015+ features are supported by browsers today than people seem to think as well. A large number of people still think of things like arrow functions, let/const, async/await, and so forth as "esnext" features when in many cases they are "estoday". (Assuming of course you don't need to support IE11, and good luck if you do.) While TC39 has been trying to be very strict about backwards compatibility, there's still a ton of room for language evolution and it's been moving at a rather aggressive pace.
Also, it's hard to call any language like (Q)BASIC or Javascript a "toy language" when it is used to build so many real world practical applications. The esoteric programming language is full of some truly interesting toy languages. Both Javascript and almost every flavor of BASIC has powered real world applications for decades. The underlying fundamentals/foundation of JS is sound enough that many things have been accomplished with the language, even if it isn't aesthetically pleasing to some (or sometimes betrays its very rough, "quick and dirty" development origins).
(Then there's of course the digression in whether or not WASM is also building a sound VM option for languages that really don't want to work with JS directly on the web/in web browsers.)
- henriquez 7y agoI think this is a fair critique; I could have made the same case with the "toy programming language" statement left out. I love JavaScript and there are brilliant apps written in it, but I do think it's good for people to consider whether they need to depend on it in all cases.
- pdimitar 7y ago> Also, it's hard to call any language like (Q)BASIC or Javascript a "toy language" when it is used to build so many real world practical applications. Can we stop conflating "it's popular because we had no choice but to build web apps with it for two decades" and "it's a good language", please? Mud bricks also saw huge usage thousands of years ago. Still doesn't mean they were a good building material for houses.
- krapp 7y ago>Mud bricks also saw huge usage thousands of years ago. Still doesn't mean they were a good building material for houses. But mud brick (AKA adobe) actually is a good material for building houses in certain climates, and it's still being used to this day. If it's the case that Javascript being necessary doesn't make it good, it's also the case that Javascript being old doesn't make it bad.
- pdimitar 7y agoMe and many others never claimed that "old" == "bad". That's not the argument at all. It's all the quirks and widely accepted strange behaviours that JS devs grew a Stockholm Syndrome for. And that you can do without if you used another language on the browser.
- krapp 7y agoEvery language has quirks and widely accepted strange behaviors. Replacing javascript with another language in the browser would just give people another list of things to complain about.
- pdimitar 7y agoA much smaller list.
- ficklepickle 7y ago===
- WorldMaker 7y agoI don't conflate those things at all. I think it is a good language under the hood, and it remains in browsers because it is popular. Browsers got rid of VBScript for several reasons, and they'd ditch Javascript if there was a populist uprising. (That seems unlikely and Google's efforts with Dart seem pretty clear that there is little interest in a second language in the browser, though we can argue that Google might not be capable of making a better language than Javascript.) Javascript is an interesting language on the evolutionary chart with genes from Scheme and from Self. While those genetic traits are sometimes obscured by the last minute bolting of an ALGOL-like syntax on top (by way of Java, and thus the odd name), they are still fundamentally there. There are some really smart (albeit quick) decisions underpinning the language that have helped it to survive multiple decades of (ab)use on the web and elsewhere. It has had its flaws, its evolutionary dead ends, its quirks, but show me any language without those (and I'll sell you a bridge). If there is a risk of a conflation problem here, I'd suggest it has more to do with people conflating "easy/accessible" and/or "populist" with weak or bad. BASIC is "bad" because it was made to be easy and welcoming to beginners. (But it still got a lot of serious work done in almost every field, by just as many [domain] experts as language beginners.) JS is "weak" because it was made for being embedded in browsers. (But the web browser became one of the most important forces on the internet for better and worse, and most of its weaknesses have been scrupulously filed off in daily usage and security audits and the pendulum swings between market competition and monopoly.)