5 ms·
It's was my take in 2015, when saying it then got you bashed to death. Now you can say it, since people have been burnt enough to admit it, but ironically it's
by BiteCode_dev 5y ago
It's was my take in 2015, when saying it then got you bashed to death.
Now you can say it, since people have been burnt enough to admit it, but ironically it's actually less true.
Yes, the JS language is always hackish. The stdlib sucks and the ecosystem is a Jenga tower. A lot of JS projects are still what I call "disposable code bases".
But.
Modern JS is tolerable. Functions are now decent, you have let/const, map/filter... There are even some nice things:
• spread and destructuring, and they play well with the limited data structures.
• simplest async paradigm ever: immediate schedule, and returns a Future, may attach a callback or prefix with await.
• concise arrow functions.
• ? and ?? operators. I actually miss them in Python.
Tooling has improved tenfold:
• VSCode gives you good code intelligence out of the box.
• any build tool will solve imports, scoping, "this" weirdness, browser compat, etc.
• new gen builders, such as ViteJS (or anything based on rollup/esbuild), are fast, reliable, and have sane default. No more webpack trouble.
• new gen packagers, such as pnpm, are fast, reliable, and save a ton of disk space. No more "takes 10 minutes, download the entire internet 3 times".
• with VueJS (SPA), htmx (ajaxify Django, Rails, Laravel...) and petite-vue (progressive enhancement), front end dev is almost fun. And light.
• Typescript.
Now, I still avoid JS if I can. I don't like having to google simple things like type coercion or how to left trim a string.
As soon as I can go Python, I do so. It's hard to beat Django or FastApi for the web, Typer for scripting, pandas for data analysis, pytest and robotframework for testing, or just the stdlib/pypi.org for pretty much everything. And with shiv and nuitka, deployment is now on a different level.
But when I have to use JS, I don't dread it anymore.
- samastur 5y agoAnd I think the article is largely correct even though I don't dread developing Javascript-based applications. One of our Nuxt applications with default build configuration sometimes builds successfully and sometimes fails miserably for reasons not understood. So we just run the process until it succeeds. I would never tolerate this in Python or take it as lightly as I do here, but like a frog in hot water I've been conditioned to almost expect it or at least not get too bothered by it. I think Javascript the language is fine. But the rest of ecosystem feels enormously creative, myopic and too often fragile.
- zengargoyle 5y agoThe thing with Javascript is that it sucks so bad that there are what a dozen or so languages built on top of it that get transpiled to JS to run in a browser or on V8. It sucked so bad that nobody really wanted to use it, they'd rather build a compiler and write in something else and tranpile into JS. How can a language be "good" when there are so many attempts that take such effort just trying to avoid it.
- BiteCode_dev 5y agoNote I never said it was good. Half of the popular projects around JS are indeed created to workaround its deficiencies, or the JS DOM API limitations. But working with JS, thanks to those efforts, is now much more agreeable. And the language itself has evolved in the right direction.