3 ms·
Bear in mind Deno isn't the only competitor. GraalJS can run all NPM modules on top of the JVM, in fact it supports both "pure" running JS on top of the JVM an
by thu2111 6y ago
Bear in mind Deno isn't the only competitor.
GraalJS can run all NPM modules on top of the JVM, in fact it supports both "pure" running JS on top of the JVM and also provides a mode in which it replaces V8 in the original Node binary, for extra compatibility with e.g. native extensions.
This gives you at least three major tech wins:
1. Interop with the entire Java ecosystem and also as other Graal languages improve, with them too (e.g. Graal's Ruby support is pretty great, Python is maturing)
2. Extremely efficient and scalable pauseless garbage collectors.
3. Ability to do shared-memory multi-threading by sharing Java objects between workers.
And soon via Project Loom there'll be very light weight fibers too i.e. you can write your code in a fully blocking style, no promises or async/await, but it'll be just as efficient as Node.
It can load sources from URLs too (see https://github.com/graalvm/graaljs/blob/master/docs/user/JavaScriptCompatibility.md https://github.com/graalvm/graaljs/blob/master/docs/user/Jav...)
It feels like Deno has focused on adding JS-specific features, and sandboxing is an admirable goal. Obviously GraalVM can do that too as long as you're in pure JVM mode, and aren't installing native/C++ Node extensions. So it may well be that Deno is more attractive to pure-JS hackers. But for people who need or want to bridge ecosystems, or scale a single JS program up to much larger heaps and higher performance programs, GraalJS is a serious competitor. Probably Node people don't take it too seriously because it's sort of outside their social circles.