3 ms·
Or you know, instead of that content-less juvenile rant, we could actually talk about the merits and the disadvantages of JS as a platform like real software en
by coldtea 9y ago
Or you know, instead of that content-less juvenile rant, we could actually talk about the merits and the disadvantages of JS as a platform like real software engineers.
For example you've missed facts like:
1) Javascript as a language is not really that worse or better than any other popular language. C++ has its complexity issues, C has its undefined behavior and foot-guns, PHP, Python and Ruby have their share of warts, Java has slow progress and the crappy over engineering ecosystem, etc.
It's a dynamic language with crappy coercion rules and a few bad decisions, but also great expressiveness.
2) Javascript has great vendor support, and the fastest dynamic JITs and interpreters bar none, not from one, but for 4 major vendors (Apple, Google, MS and Mozilla). Python, PHP, Ruby, et al don't even come close, even with things like PyPy.
3) Javascript is the default language of the web, the most popular delivery platform today.
4) Javascript has huge library support and tons of packages.
5) Javascript has incorporated lots of advanced concepts (for popular, non-academic languages), from generators and proxies to async/await.
>Then Google released Chrome with V8, some people thought this meant JavaScript was cool now, and it's snowballed from there.
Webkit, v8 and Mozilla's JS JIT were released within months of each other, and have been in work for years before. So this has nothing with Google releasing v8 -- the industry in general wanted faster JS execution. In fact TraceMonkey (Mozilla's JIT) was the first to be released.
If any Google action was relevant to this, it was the popularization of AJAX (which MS introduced) through apps like Gmail that set the future direction for the web.
- tomc1985 9y agoThe "contentless" "juvenile" rant matches my memory of the JS scene at that time. And while certainly the JS scene nowadays is bigger, it is the opinion of a lot of veteran devs that the scene is a mess and that people are crazy. It's taken a decade for JS to mature as a language and community to even be considered at-parity for C, C++, Python, or Ruby. Equivalence didn't even enter the picture until recently. Why is it most newbie-level training materials and most language discussions nowadays seem to center around products ("React", "Redux", "Angular", etc) than techniques? How ironic given the algorithms fetish that is so common in hiring. How many of these devs can function without a framework? What does that say about the choices made by the community? What's funny is that JS -- even ten years ago -- wasn't that bad of a language (weird, definitely, but I wouldn't call it bad); unfortunately it was strapped to various messes of HTML engines and competing standards. JavaScript hell ten years ago was shimmying browser features and figuring out how to do that thing that jquery replaced with $(document).ready(). Fighting against the language itself was much less common.
- coldtea 9y ago>And while certainly the JS scene nowadays is bigger, it is the opinion of a lot of veteran devs that the scene is a mess and that people are crazy. Well, if those veteran devs need to invoke widespread psychological problems ("people are crazy") to explain something, shouldn't they take it as a sign that they have a non-explanation? Besides, opinions are like kidneys. Everybody has at least one. >It's taken a decade for JS to mature as a language and community to even be considered at-parity for C, C++, Python, or Ruby. Equivalence didn't even enter the picture until recently. So? You think C, C++, Python or Ruby did that in less time? Ruby, for example, was pretty much non-entity on the programming landscape until Rails emerged. C++ took a decade to be adopted for mainstream programming, as did C. >Why is it most newbie-level training materials and most language discussions nowadays seem to center around products ("React", "Redux", "Angular", etc) than techniques? Because the techniques have been long established and there are countless existing tutorials about them that don't go out of relevance (so no need to write the 1000th e.g. module pattern tutorial). >How many of these devs can function without a framework? Pretty much everybody? >What does that say about the choices made by the community? That they solve common problems (they all make web apps) and have the good sense to not implement the same wheels from scratch every time? >JavaScript hell ten years ago was shimmying browser features and figuring out how to do that thing that jquery replaced with $(document).ready(). Fighting against the language itself was much less common. Who "fights against the language itself" today?
- cookiecaper 9y ago>Who "fights against the language itself" today? It is true that now, 22 years after JavaScript emerged as a toy language to allow people to do simple UI tricks like creating alert boxes, and 8 years after people started trying to shoehorn it into the backend for GCool Points, JS has finally started to adopt some useful features. ES6+ address most of the glaring omissions, and writing a script in JS/Node now doesn't feel too much different than writing a script in Python or Ruby (though much more build infrastructure is required; JavaScript is anything but native outside of the browser). Bolting on those features that have been available in other languages for much longer is a big accomplishment from the ECMAScript people, so props to them. But there are still many instances of people "fighting the language" in the practical sense (the sense that matters). Two main exhibits: Node's "harmony" feature release model that requires the VM to be run with certain flags to enable certain syntax (much worse than Python's `from __future__` model) as well as Babel's entire existence and widespread usage. I don't know how often you use other languages, but JavaScript is the only platform where I have to run my code through a chain of slow, third-party transformers just to use simple language features like constants with confidence. Separately, the standard lib is bare and implementations remain inconsistent, requiring everything to be built on struts like lodash and jQuery (with tons of random dangling accouterments pulled from random GitHub repos, a la `left-pad`) that paper over JS's major pain points and general impracticality. Other scripting languages have convenience libraries and wrappers, even alternative implementations, but nothing else goes to the extremes we see in npm, where it's quite common to pull in single convenience functions as libraries. While these things may not be quite fighting the "language" from the stringent academic perspective of the ECMAScript spec, they do represent practical constraints on virtually all real-world use. Just as you'd be crazy to try to use JavaScript without jQuery back in the day, you'd be crazy to use it now without the huge amalgam of crap people have developed (babel, lodash, webpack, yarn, etc.) because they are so inexplicably committed to shoving the square peg of JS through the round hole of server-side programming.
- cookiecaper 9y agoThe intent was not really to get into a detailed deconstruction of JavaScript, it was just to comment on the fad-chasing behavior of the JavaScript subculture, as a follow-on to the parent poster's recognition of this within React users. I don't understand how any person can pretend that everyone was excited about the "promise" of JavaScript back in the day; you'd have to be relatively new to the scene to earnestly believe that, and as a prominent HN poster whose posts I usually enjoy, I know you aren't. This must be some reverse-psychology thing where you're trying to convince yourself that the emotional fad-chasing was in fact merit-based. Your points are all backwards-looking. I've already conceded that JavaScript is a major/important platform today and I've accepted that I need to use it in various new ways besides basic DOM manipulation, regardless of the deep sadness for tech culture incurred by doing so. Now that Node.js has ridden the hype train for 8-ish years, there is "great vendor support" and "a huge library". For the sake of argument, we'll gloss over the facts previously mentioned that a) as "the default delivery platform of the web", JavaScript is still massively constrained, and it's much easier to "deliver" backend applications with a real server-side language; and b) that this "huge library" includes many things that would be part of the standard library in a better-managed language, and that there are a great many undesirable side effects to the npm model of allowing random GitHub users to control huge dependency chains (from both a security and a QA perspective; cf. the left-pad fiasco). Before V8, even JS inventor Brendan Eich spent much of his time offering excuses for and acknowledgements of its major inadequacies: "I only had 10 days!" and "At least it's not VBScript!" being the primary responses. I don't want to diminish Eich's herculean efforts because they truly are impressive, but the point is that no one pretended that JavaScript was the kind of thing that you'd want to use in any context where it wasn't mandatory. This is very unlike Python, Java, or most other professional-grade languages. >So this has nothing with Google releasing v8 -- the industry in general wanted faster JS execution. V8 was revolutionary because it took JavaScript from one of the slowest languages around to the nearly-the-fastest dynamic language (vying with Lua for the crown). The demand was there so that browsers could become a platform for more intensive client-side applications like 3D games. Nonetheless, without Google's propaganda machine turning its gears, V8's announcement would've been relegated to the same small group that followed the release of other JS VMs. It is completely due to the "I'm cool like Google too!" mentality (which has had massive influence on tech over the last 10 years) that Node.js got any traction whatsoever. Node.js made its V8 backend one of its primary marketing points to reinforce that association and make people believe that using Node.js was like using a super-cool Google-fied JavaScript instead of the normal, boring JavaScript you knew from the past.