4 ms·
TypeScript strengthens the JavaScript ecosystem by making it easier to write correct code, and easier to use code correctly. I suspect the author's self-profess
by AaronFriel 6y ago
TypeScript strengthens the JavaScript ecosystem by making it easier to write correct code, and easier to use code correctly. I suspect the author's self-professed lack of knowledge of TypeScript is the biggest barrier, but that's not why I decided to write this comment.
I wonder how many times the author has used node-gyp, node-sass, or even a wasm-pack packaged NPM package? The latter allows writing NPM packages in any language that compiles to web assembly. That's quite a few languages already, most of which are much further removed from JavaScript.
Despite that, I think that strengthens the NPM ecosystem, even if it "weakens" the JavaScript ecosystem. (I don't think it does, actually.) It means NPM is one the first and largest polyglot package repository. It's certainly the largest public source code and library repository in the world, and now or very soon, it will be possible to reap the benefits of packages using webassembly to get (nearly) bare metal performance without compromising security.
I would also argue this strengthens the JavaScript ecosystem too because all of these languages work transparently with JavaScript. The first-class citizen remains JS, for now, and people writing C/C++, Rust, Scala, ML, and others to webassembly are making their code available with JS bindings that just work. That's pretty amazing.
The closest thing to this is Python, and it's so nontrivial to contribute native or FFI code that works reliably to pip that it's not done outside of a handful of extremely performance sensitive data science projects. For this reason, I think JS (and webassembly) is ascendant, and Python's star is at its peak.
- oaiey 6y agoAlso why thinking NPM to limit to a language. The browsers and node are essentially virtual machines (evidence: see wasm). NPM is the package manager of this VM and not the JS language (ignoring that there is no TS code shipped).