6 ms·
Javascript was/is a mistake.
by fake-name 3y ago
Javascript was/is a mistake.
- krapp 3y agoJavascript was the first modern high level programming language available to the masses, and easily the simplest to use and deploy. It allowed millions of people a degree of creative freedom only available in universities, and it's the reason the web is more than simply a collection of research papers. I know a good portion of HN wishes it were otherwise, because the endless (and at times deranged) antipathy towards javascript is so constant here there is an entire rule in the guidelines telling people to not just go on a full tilt rant about its very existence when a site requires it. But for everyone else (especially those of us for whom javascript was a gateway drug) it was obviously not a mistake. The mistake was all of the extra complexity and nonsense that came about when SV realized the web was Serious Business. Having to compile it from a "strict superset" language because Serious Business means strict types and tests, tests tests. Taking it out of the browser, aligning the entire ecoysystem to a single, fragile, badly designed point of failure. Let's abandon the entire field of application programming and just ship an entire Chromium instance and a webapp for everything. What happened to all of my RAM? Who cares, everything is free now, numbers are a lie. I mean the entire point of frontend frameworks was supposed to be that it would simply be faster to transport JSON diffs rather than entire html pages, and do the rendering in the browser. But of course any such efficiencies wound up being eaten by increasingly bloated and inefficient code. And now people are discovering backend rendering and "vanilla" JS like Howard Carter discovering the tomb of King Tut. Javascript the language, even Javascript the idea (being able to write and run code on the web) is at worst neutral, and arguably a good idea. At least from the point of view of the old hacker ethos where the point is to liberate the masses from the gatekeepers of intellect and information is as many ways as possible. But as with everything else turning to shit in our world, blame capitalism for taking something with the potential for good, and utterly ruining it.
- glimshe 3y agoWe have been able to largely get rid of COBOL. Why haven't we been able to do the same with Javascript? It's a very useful language given the amount of existing code and support, but very few people I know actually like it. In the 90s, vendors seriously invested in major development suites (Visual Studio, Visual Age, C++ Builder, Delphi, Visual Basic) and improve languages (Java, C#, Pascal, Basic) for desktop environments. But the web development landscape is largely dominated by Javascript, which is actively hated, and Typescript, a better but far from great alternative, with everything else being a tiny percentage. What happened?
- jauntywundrkind 3y agoWhat happened is that contempt culture solidified as one language became the top language. What happened is contempt culture solidified as pro-native-users came together over their disdain for the web. The is a steady stream of js contempt on HN. I don't think it's representative of how actual devs think about JS. The contempt forever seems stuck at the shallowest stages, of assuming JSnis terrible & disparaging it out of hand, without making a single claim or contention. Building on the web is not difficult & gets your experience in front of users fast. We've made better and better tools, while exploring a huge variety of app development styles. I don't know what js did to so many of y'all. I've done web stuff across libcgi, perl, php, java, and yeah early js has some warts but it's like 98% the same as any other language would be (even if classes looked weird for the first decade). The npm package management ecosystem is vastly easier to use & understand than anything I'd seen before. It's unclear what about this language makes people so miserable, and it's not something I've seen in person in my professional career. But the contempt is on high display regularly in the comments.
- dleeftink 3y agoI think much contempt is actually directed at how JS features have not always had the same performance profile, support, or implementation across browsers. The language itself is fine, and incongruities have long been polyfilled. With Shared Array Buffers, Webworkers, WASM and WebGPU, offloading heavy computational work will only become easier.
- AlexAndScripts 3y agonpm is easy to use? In my experience npm and the ecosystem that surrounds it are the only package managers I have ever used that consistently don't work, and in terms of design/ease of use in the theoretical scenario of it working properly it's marginally better than pip and significantly worse than cargo and hex.
- namaria 3y agoI guess some people don't see the problem with an excess of accidental complexity when they get paid a lot of money to do simple things like building UIs in a very complicated way.
- flagged24 3y agoJavaScript (TypeScript) is my all time favorite language. I write code in Go, PHP and Python and have coded in C# and Java. But for me nothing beats the simplicity, ergonomics and maintainability of modern TypeScript.
- 0dayz 3y agoI think you misunderstood the post, they mean that the original purpose of Javascript has been misused (with mostly the fault lying on the web stack) instead of it being a bad language.
- hombre_fatal 3y agoWhy would that be the cocksure interpretation of "JS is a mistake?"
- fake-name 3y agoI mean both. It's failed it's original purpose, and also it is a uniquely gross language in terms of actually having to write it. Javascript is deeply unpleasant to work with in any way.