5 ms·
It's still mostly the same. Nothing much has happened in the JS space in the last 2 years that would make all this easier. The JS ecosystem suffers from a huge
by longrod 4y ago
It's still mostly the same. Nothing much has happened in the JS space in the last 2 years that would make all this easier.
The JS ecosystem suffers from a huge issue of duplication. There's multiple module systems, multiple ways to make a function, multiple ways to make a class, multiple ways to make a variable, multiple ways to loop over the array. Some of those exist in other languages as well but it's pretty bad in JS.
The problem is a language where you can do anything but where every day something has changed and the new something is the new cool. Now you have to ditch what you learned + the libraries to migrate to this. Or you have to use babel.
The module system fragmentation is the worst thing that can happen to a language. Unfortunately, I haven't seen anything remotely close to a bridge between CommonJS & ESM so both can coexist peacefully. If you turn towards one, node starts screaming about how ESM modules can't contain require and if you go the other way, well then CommonJS doesn't have import.
Aside from that JS is a great language. No, just kidding it's a mess.
- lolinder 4y ago> The module system fragmentation is the worst thing that can happen to a language. Unfortunately, I haven't seen anything remotely close to a bridge between CommonJS & ESM so both can coexist peacefully. If you turn towards one, node starts screaming about how ESM modules can't contain require and if you go the other way, well then CommonJS doesn't have import. It's possible it's more confusing on backend node, but on my current frontend project I can import any module without caring what type it is. Yes, I have to pick one import syntax, but I'm not sure why I'd want to mix them.
- longrod 4y agoYou don't realize what's required for all that to work properly. Webpack + Babel at the least. Expecting that a beginner developer will have to learn these to write even simple programs is absurd.
- lolinder 4y agoI set up the project myself, so, yes, I do know what's required. :) For this project, `vue create my-project` and choosing TypeScript was sufficient. I've done it before by configuring webpack and babel by hand, and yes, that can be a pain. I certainly wouldn't recommend a beginner start with that, but the existence of complicated options doesn't disqualify the simple solutions.
- golergka 4y agoThis "duplication" allows tooling, libraries and ideas to compete with each other and evolve.
- dglass 4y agoLanguages that don’t have this duplication are able to evolve their tooling, libraries, and ideas just fine. Duplication isn’t required for these things to happen. All it does is fragment the ecosystem.
- Jasp3r 4y agoThe whole issue of JavaScript is that the standard library is worthless, so people have to write additions to keep yourself sane as a developer. This makes it seem that there are 5 billion ways to do something, because there are. Just use TypeScript, it will fix all the issues you have with the language itself. Typing + build time errors + import/export syntax. If you want to run some this in the browser, and don't use Vue or React, it will still require manual work to setup webpack + babel I still hear this hypetrain argument a lot, but only on hacker news. This hypetrain you have been talking about is however not the case anymore. JavaScript + TypeScript have been stable for the last 3 to 5 years, the only big change in FrontEnd development was that people have been pivoting to server side rendering. As a fullstack dev, the most hypetrain stuff I see is with infrastructure. Docker? Kubernetes? Terraform? Combined with 15 different ways to do the same thing in AWS but worse, no thank you.
- goodoldneon 4y agoYea, TypeScript makes things easier. I think it's _also_ way better than plain JavaScript, but the simpler tooling is a huge value add on its own
- halfmatthalfcat 4y agoI rarely, if ever, have to reach for anything outside of the standard library for computation/algorithms. ES6 added most, if not all, the building blocks to build 99% of the computation you'll ever need. What's missing that you'd deem as worthless?
- tmh88j 4y ago> ES6 added most, if not all, the building blocks to build 99% of the computation you'll ever need. What's missing that you'd deem as worthless? Not the same person, but date/time manipulation is one area I've encountered that's incredibly frustrating (especially when timezones are involved) without libraries like moment. Cross-browser functionality only compounds the issues.
- halfmatthalfcat 4y ago
- deleted 4y ago[deleted]