DEV Community

loading...

Discussion on: The Shocking Immaturity of JavaScript

Collapse
zaydek profile image
Zaydek MG

I think Node / JS became popular out of necessity. JavaScript kind of cornered the market by making it the only viable target for deploying to the web and Node bootstrapped V8 to make that happen on the backend. But JavaScript kind of has this legacy, with JavaScript being originally implemented in something like two weeks and not being able to revise itself due to backwards compatibility concerns. So it makes sense -- in hindsight -- why Node / JS can be so out of whack, but only if you understand the context in which JS was created and then ported to the backend.

I will say that NPM / Node / JS is fairly accessible today but that’s only if you are down with learning a bunch of tooling that may or may not fall out of fashion in the near future. Frontend is a tumultuous world.

All that being said, this is certainly not the best we can do. I really like that some frontend devs like yourself have branched out and are leveraging backend technologies, because the added experience can help re-contextualize frontend tooling for the rest of us.

I’ve never tried Ruby but I hear generally good things, depending on who you ask. 😀

Collapse
rxza profile image
youngdagobert

Ruby coder and can confirm its SO much easier than doing stuff in JS. Community is really helpful too :)

Thread Thread
thebarefootdev profile image
thebarefootdev

Subjective ease of use doesn’t always indicate quality, there are many reasons why some find things easier and harder. Usually that a lack more complete understanding of a language is why another is considered easy.

Simply because a language is syntactically clearer to an individual does not eschew any functional comparison, it’s more about the underlying language engineering and whether it’s a good approach for the domain solution and not entirely clarity for the developer

Thread Thread
jaredcwhite profile image
Jared White Author

It's a mistake to optimize for computers at the expense of humans.

Thread Thread
zaydek profile image
Zaydek MG

Comment of the year. 👍

Collapse
leob profile image
leob • Edited

I think JS might (gradually) be getting there in terms of DX - e.g. if both browser engines and node.js implement most of ES6/ES7/ESWhatever natively (so that we don't need Babel and so on), that will make a big difference.

It's not the whole story, but just the tooling is so much simpler for the other stacks (Ruby, PHP and so on).

Hopefully we'll gradually get less fragmentation and more 'standards' in the JS world.

Thread Thread
zaydek profile image
Zaydek MG

JavaScript is definitely more ‘aligned‘ then it’s ever been before. Though there is quite a bit of fragmentation now coming from tooling like TypeScript, for better or for worse. I use TypeScript but I feel like my TypeScript is not going to be constructed the same as everyone else’s because there’s a thousand decisions every TS developer needs to make or will be made for them and that causes me some concern.

I’m also all for not betting on Babel going forwards. I get that it was necessary at one point to really be productive, but it strikes me as a burden now to have fragmentation, like you said, in the core language itself, let alone TypeScript and type-oriented extensions. It surprises me that I haven’t heard more complaints about Babel?

It’s not that I dislike Babel, I just think it doesn’t make sense to force projects into using Babel because of legacy codebase decisions.

Thread Thread
leob profile image
leob • Edited

Spot on ... Babel is of course a technical marvel, but I never liked the fact that I'm not programming in the "real" language, but in a pimped version of it, which then needs to be cross-compiled to "the real thing" - in a separate build step (so, as a code generator, in fact).

It also makes debugging that much more of a hassle, always the struggle with source maps etc.

Obviously I respect the people who developed Babel, but I say good riddance when we don't need it anymore, once browsers and node.js support newer JS versions natively.

Ah yeah but then there is TS :-)

What I'd really like is if these "cross compilers" or "pre compilers" were just integrated into the JS engine, so that it would be something like a seamless "just in time" on demand compilation step, rather than requiring a clunky external build step ... JS is the only mainstream language which has all of this baggage.

Thread Thread
zaydek profile image
Zaydek MG

You may want to check out esbuild if you haven’t already. ;)

Thread Thread
leob profile image
leob

100 times faster than Webpack or Parcel ... how the heck is that possible?

Thread Thread
zaydek profile image
Zaydek MG

Webpack / Parcel are implemented in JS which ultimately is going to be as fast / slow as V8. esbuild is implemented in Go (closer to the metal) and uses a lot of concurrent algorithms as an optimization. In 1-2 years I think esbuild will emerge as the dominant tooling provider.

Thread Thread
leob profile image
leob

Right ... but why does that have to take 1-2 years? If it's that much better then I'd use it right away and dump the rest!

Thread Thread
zaydek profile image
Zaydek MG

It’s pre 1.0 and missing a few core features. It’s not far off but it’s also not 100% adoptable yet.

Thread Thread
leob profile image
leob

Ah okay :-)

Forem Open with the Forem app