by andrewmcwatters · 3y ago · 0 comments
Would it have been impossible to nudge Node.js in the direction of where Deno is today?
Would it have been impossible to replace Babel with a Go implementation?
I also don't want tools that want to be literally everything.
Imagine if Daniel Stenberg was like, "You know what I'm tired of cURL, let me rebuild literally the same thing in another language and give it a new name, and entirely different opts."
Yes, do you not remember the whole nodejs vs. IOjs split? The community is already pulling node in tons of different directions.
> Would it have been impossible to replace Babel with a Go implementation?
Again, yes it would be impossible by dint of the fact babel is made to be a framework where you process JS ASTs using JavaScript. Rewriting it in Go removes the whole ecosystem of JS plugins it built, which is kind of the entire point of the project. A Go rewrite of certain transforms is a new project.
JS has nothing like that, and it has been cool to see more experiments around this type of approach. Many disparate tools and versions are hard to manage because there are so many permutations of options!
I don’t think anything necessarily prevents Node from being nudged in that direction — and I think we’re seeing the first signs of that with Node 20 — but the implication in nudging is that it takes a comparatively much longer amount of time. Deno has its own set of challenges as a result of it being an independent project with its own sets of breaking differences, but I think the goal with Deno was try to push the JavaScript server ecosystem forward rather than to slowly nudge it forward (with the sizable resistance that entails).
cURL is more singular here in comparison; there’s no rapidly-changing ecosystem that dictates the pace at which it changes or improves, but that’s not the case for the JavaScript ecosystem (see: Node’s many problems in keeping pace with the adoption of modules over the last several years).
Kind of a pessimistic view, but I do think this is what happens.
You call them thought leaders, Jamie Zawinsky used to call them attention-deficit teenagers, in his CADT model theory of open-source.
www.jwz.org/doc/cadt.html
I have sometimes the same feeling. I often dream of a "united community" working on a "perfect tool".
But there are so many differences in the community. In reality – as in most human systems – people create their own "dream tools". And the success of new tools influences earlier tools trying to catch up.
Because Deno has some traction, this forces Nodejs to catch up. I think Bunjs has accelerated some changes in Deno's Nodejs compatibility.
In the process, a lot of efforts seem lost. However, this is the way humans and communities are working: people learn by imitating others, changes are often pushed by new tools and systems that have more freedom to evolve.
Both Node.js and Deno have strong reasons to exist. Node has a massive installed base that values slightly more stability at this point. Deno benefits from being able to boldly explore big changes.
There’s a ton of value of everyone using the same tool even if it isn’t perfect for every specific use case. Now install readme files regularly explain both yarn and npm installs and the community needs to be aware of the existence of two basically identical tools.
https://github.com/orogene/orogene/blob/main/BENCHMARKS.md
As you can see, both bun and orogene beat the js implementations by miles.
But, I only see this happening in the JavaScript space.
There seems to be something intrinsically wrong with JavaScript and NodeJS that a lot of the tools used to manipulate the language is written in other languages.
JS linters running in Node are mostly CPU-bound. You can get an order-of-magnitude improvement from writing those tools in Rust.
Would you get divorced from your spouse if something minor wasn't working out, too?
The other problem with existing and working projects is, that they have maintainer and a community and you can't change things radically. That is a really long process.
And sometimes competetive projects improve each other.
It's not the 1st time NodeJs required "forking". And so what if we do nudge Node yet again? It will just keep repeating itself unless there are bigger changes.
> Would it have been impossible to replace Babel with a Go implementation?
More like the world has changed since IE left the chat. We need less / different set of polyfills.
* Single file scripting with dependencies
* No node_modules folder
* Typescript built in. You might dismiss it as easy, but it's only easy in the sense that it's not a lot of work if you've done it. It's still a massive faff and paper cut. Whatever the next thing up from a paper cut is. Toe stub?
* Guaranteed type hints.
* A good standard library
All the others are subjective (and wrong :))