Live data from Hacker News

The Shocking Immaturity of JavaScript

dev.to

21–30 of 78 posts

Re: The Shocking Immaturity of JavaScript

#21
post #6

I did web dev for a few years using Angular + various other tools, and yes, it was nightmarish. I had to come back to it briefly recently. But using "boring" Typescript, esbuild and preact, I have to say the experience was an immeasurable improvement. Verging on pleasant even. Everything was well-documented with strong Stackoverflow coverage. So, boring > shiny

Typescript, esbuild, and preact would have been described as shiny not very long ago. These things take time to mature.

I agree that the current JS ecosystem is fine if you don't get too far off into the weeds with obscure dependencies.

Re: The Shocking Immaturity of JavaScript

#22

> From backend ORMs and headless APIs to frontend site generators, package managers, and build tools—it's a miracle any of it actually works properly in production! I think the issue is clear from this first sentence. Why are there any of these things in javascript ? The marvel is that in 2021 such a sentence can be written -- that these things are immature seems both obvious and to miss the point.

Why should they not be?

Re: The Shocking Immaturity of JavaScript

#24
post #6

I did web dev for a few years using Angular + various other tools, and yes, it was nightmarish. I had to come back to it briefly recently. But using "boring" Typescript, esbuild and preact, I have to say the experience was an immeasurable improvement. Verging on pleasant even. Everything was well-documented with strong Stackoverflow coverage. So, boring > shiny

Wasn't esbuild released literally last year?

Re: The Shocking Immaturity of JavaScript

#25
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.

Re: The Shocking Immaturity of JavaScript

#26

When a language becomes stable, it also begins to lose popularity. (This is widely discussed). Javascript is the only language that has continued to grow forever without becoming an "old" language in dev mindset. One reason is the constant churn of tooling, another is the immaturity of everything, so every generation of devs have a place to add something. Overall JS gains more than it loses. This is similar to the co…

Well having a monopoly on the most popular and power programming platform of the planet, the web browser, will do that.

In fact, remove the browser monopoly, and give it to Visual Basic, and in 3 years, VB will be the most popular language of the world.

Re: The Shocking Immaturity of JavaScript

#27
post #6

I did web dev for a few years using Angular + various other tools, and yes, it was nightmarish. I had to come back to it briefly recently. But using "boring" Typescript, esbuild and preact, I have to say the experience was an immeasurable improvement. Verging on pleasant even. Everything was well-documented with strong Stackoverflow coverage. So, boring > shiny

You probably already know this, but for anyone wanting to do this: esbuild does not do any type checking, so TypeScript with pure esbuild (without a separate tsc step) is only half useful (it gives you better autocompletion, but not much else).

https://esbuild.github.io/content-types/#typescript

Re: The Shocking Immaturity of JavaScript

#28
The title misses the point.

You can have a perfectly stable JS experience if you let go of the need to stay on top of the latest trends. I've done node.js since it came out and I stopped feeling like the author about 5 years ago. I've continued developed in js regularly but am generally "out of the loop" with regards to web framework trends etc. Apart from deprecations of request and moment and the occasional syntactic sugar, not much has changed in years now.

Just the other day I made a greenfield web project for the first time in a long time, took me about one intermittent day to get from 0 to "good enough" with a couple of views. typescript, hapi, and pug. It doesn't have to be complicated.

https://codeberg.org/3np/rimgu

(Not saying this is a perfect project and you may argue it falls under the "do x in 10 mins fallacy" but if you think JS projects have to be complicated and unstable - they don't have to)

Also, I find it unexpected hearing that comparison with Ruby. I've spent way too much time struggling with Ruby deprecations, buid systems, linters, and broken or undocumented web frameworks (Grape) that I think Python may be the one better comparison.

And really, which ecosystem with comparable legacy has a significantly better track-record of webdev stability? Java? .NET? PHP? Go? It's a mess everywhere.

Re: The Shocking Immaturity of JavaScript

#29
post #24
post #6

I did web dev for a few years using Angular + various other tools, and yes, it was nightmarish. I had to come back to it briefly recently. But using "boring" Typescript, esbuild and preact, I have to say the experience was an immeasurable improvement. Verging on pleasant even. Everything was well-documented with strong Stackoverflow coverage. So, boring > shiny

Wasn't esbuild released literally last year?

In JS terms, that's like a dinosaur.

Re: The Shocking Immaturity of JavaScript

#30
I can understand new libraries being crappy, it takes time to get good and that's why you should pick well established libraries. True, the hype machine is huge in the js world and the superstars in it are better marketers on twitter than coders.

I'm not going to touch anything graphql related for at least 5 more years and hopefully I will never have to touch it. React became decent last year when next started being mature enough.

What I don't like is all the transpiling and new language features getting to js. The single worst decision was to swap require for import. I don't care how much better the new model is, it broke too much stuff and I feel pain at least once a week because of that crap.

Frankly, that's a nightmare and I think it will be years before it's decent to use - or maybe we'll need deno to get there.

I swapped js with rust (+rocket) for all my personal projects and it's been nice - but I'm still stuck with js on a few projects where I'm collaborating with other developers who are not going to realistically learn rust.

Post reply on HN