DEV Community

loading...

Discussion on: The Shocking Immaturity of JavaScript

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