4 ms·
Modern JavaScript is not a very badly designed programming language. It's a good, productive programming language. Most of the quirks can be disabled with a lin
by nawitus 9y ago
Modern JavaScript is not a very badly designed programming language. It's a good, productive programming language. Most of the quirks can be disabled with a linter, and optionally a lot safety can be brought in with typing (using e.g. TypeScript).
On the other hand, many developers don't know much about programming and JavaScript, and therefore tend to have unjustified criticism of the language.
JavaScript was a perfect choice for Node.js. It's event-driven design is a perfect fit for a performant web server. Python would have been a bad choice, because it didn't support asynchronous programming when Node.js was created. Furthermore, using the same language in the backend and frontend will reduce context switching, enable code reuse and generally speaking improve implementation efficiency.
- pleasecalllater 9y agoYea, modern JS... it's just a joke, no integers, still funny effects with []+[] and {}+{} and []+{} and {}+[]. Good luck with writing anything serious using such a crap.
- skrebbel 9y agoBoth ESLint and TypeScript solve all that. In all honesty, if you're not using tools like that I'm not sure you're doing "modern JS development". It's like complaining that modern C++ is a mess while refusing to use references and RAII.
- TeMPOraL 9y agoIn C++, proper tools are part of the language. In JS, they're part of ecosystem of third party components that's changing on a weekly basis. There's a difference.
- skrebbel 9y agoESLint was released in 2013. TypeScript in 2012. People keep complaining about this "weekly basis" stuff but really the pace has been pretty slow lately. If you want to use constexpr in C++ you're going to have to upgrade your compiler as well, right (and, if you're unlucky, "migrate your project files" and all that mess)?
- saas_co_de 9y ago> In C++, proper tools are part of the language. You couldn't be more wrong. The toolset that you need to develop decent C/C++ programs is massive and took decades to develop.
- matthewmacleod 9y agoModern ECMAScript is still stupid, yes. Weak typing is 100% a bad idea, and no new language would take this approach. It has, however, obviously improved to the point where it's actually quite okay to use – a modern ES7 app exploiting features like class sugar, async/await, improved syntax etc. is perfectly serviceable, alongside a linter to prevent the stupid features from old versions biting you. But a whole bunch of 'serious' applications have obviously been written using JS, and it's a totally stupid view to think otherwise. Frankly the people who are the most concerned with 'my language is better than yours' litigation are by far the least productive developers I've encountered.
- baq 9y agothis is all wrong, sorry. modern js is still js. the fact that linters are _required_ to keep code sane is proof enough. typescript is a different language, i'd wager it doesn't count, even though i agree it's a considerable improvement. au contraire, many developers know exactly what programming in js looks like, especially compared to other languages. i used to think that c++ and boost compilation was crazy. now i look at glorified web pages with 200MB+ of dependencies and wonder how we got there. i agree that js was a perfect choice for node.js, because it was the only choice for node.js - to use the same language that runs in the client. that doesn't make it a good - or even sane - choice in the greater perspective. python was and still is a good choice - twisted was used to create async services before ajax was a word. you can also take a guess from where the promise/deferred pattern took at least some of its inspiration.
- deleted 9y ago[deleted]
- bryanrasmussen 9y agoWhat language do you use that does not have a linter?
- yoodenvranx 9y ago> wonder how we got there I fully blame the virtually non-existant standard build- and module system in C/C++/JS for a lot of the current problems. This is one of the reason I really want to learn Rust. Compared to make/npm/gulp its infrastructure looks heavenly.
- nawitus 9y ago> python was and still is a good choice - twisted was used to create async services before ajax was a word. Async was not part of the core language when Node.js was first released. Even today the library ecosystem of Python is fragmented, not everything works asynchronously.
- rwaldron 9y ago"linting" is subjective, preferential—not required. Python built linting into the language itself and it's super annoying.
- aaron-lebo 9y agoIt's getting frustrating how much these discussions get dominated by people who self-admittedly haven't used a technology very much and then rant about it. Besides what you brought up, the package manager thing doesn't even make sense. I'd suggest that inexperience/ignorance isn't a great place to analyze anything from. Some of the "major" issues that dominate these discussions are not problems in practice.
- TeMPOraL 9y agoA counterpoint is that people develop Stockholm syndrome over especially broken technology, and immersed long enough will no longer register just how ridiculous some aspects of it are.
- tonyedgecombe 9y agoIt's very easy to take that knowledge you built up over years for granted and assume anybody who doesn't grasp it immediately is an idiot.
- deleted 9y ago[deleted]
- always_good 9y agoIt's easy and lazy to assume that you're the enlightened one and everyone else has some defect like Stockholm Syndrome that keeps them from seeing the light. Other people simply accept different trade-offs than you.
- gambler 9y ago>Modern JavaScript is not a very badly designed programming language. JS fans said the same thing years ago, claimed that it didn't need classes, more extensive core library, or better syntax. Then came ES6, almost a different language, and they magically changed their opinions to match. Apparently all those features they dissed were needed and good. After seeing this kind of switch-a-roo several times I realized that most of JS community have no fucking clue. They will gladly consume and defend absolutely anything they currently consider "theirs" and "modern". It's a matter of fashion and identity rather than language and tooling quality. JS was and is a horribly designed programming language. The Web would be lightyears ahead of its current sorry state if the core language was a dialect of List of Smalltalk.
- nawitus 9y ago>JS fans said the same thing years ago, claimed that it didn't need classe Well, I didn't make that argument. ES6 is not almost a different language. It provided many good features, though. >JS was and is a horribly designed programming language. Nope.