4 ms·
Deno is only possible because V8 is so hyper-optimized. If you think about it, V8 has to compile/interpret and then run javascript code on the fly after downloa
by spencerchubb 4y ago
Deno is only possible because V8 is so hyper-optimized. If you think about it, V8 has to compile/interpret and then run javascript code on the fly after downloading it in the browser. That's how good V8 is. That puts javascript in a unique position to enable something like Deno
So if there was a compiler/interpreter for another language that was close to being as good as V8, then something like this could exist for other languages.
Also, it looks like wasm works on Deno, so that gives some other languages.
- int_19h 4y agoThere are many compiled languages that produce more performant code than V8. As you noted yourself yourself, V8 has time constraints - it must be able to compile and run the code "fast enough" for a web page to load. This limits the extent of optimizations that it can perform.
- erikpukinskis 4y agoAnd for the handful of routines where all-out performance is the bottleneck for your business those languages are the right tool for the job. For everything else, there’s JavaScript.
- berkes 4y agoThere are many areas in which JavaScript "performs" poorer than other options. Productivity, stability, maintainability, to name a few. Other languages and ecosystems are much better at that, than JavaScript. Luckily projects like typescript solve those issues, or try to.
- int_19h 4y agoIf there was a reason to prefer JS, sure. But it's not really any better in other respects. The only thing it has going for it is that it's forced on you on the frontend.
- erikpukinskis 4y agoIMO, that’s the only reason to use JavaScript: you can have a single language application. With anything else you need a two language application. Going from one to two is a MASSSIVE increase in developer overhead. Not sure that outweighs the downsides of JavaScript, but that’s how I’d dispute your “no reason” claim.
- pull_my_finger 4y ago> if there was a compiler/interpreter for another language that was close to being as good as V8 Like LuaJIT that has been around longer than V8?
- LunaSea 4y agoLuaJIT is fast however it misses Node.js's (or Python's) standard library and package ecosystem.
- pull_my_finger 4y agoSo then you pull in LuaFileSystem or LuaSocket or whatever you need. I never understood this as a huge limitation. There are plenty of very mature cross platform libraries for anything I'd grab out of node's standard libs. There's even libUV bindings (luv) which would pretty much feature match nodejs completely. Add to that LuaJITs FFI you get all of C's ecosystem as well. Batteries are helpful, but it's not like Lua is completely devoid of helpful libraries.
- spencerchubb 4y agoIt would be interesting to see a Deno competitor run on Lua!
- winrid 4y agoPHP interpreted your code for every request until recently, and it was decently fast...
- jjtheblunt 4y agoGo is as good as V8, no? [ disclaimer: i was a V8 contributor 13 years ago, and it is good, but it is not the only game in town ]
- native_samples 4y agoYou can pretty easily argue Graal is better than V8 in many different ways. V8 is good at what it does but its ambitions are very limited. They only care about Chrome so anything Chrome doesn't need gets ignored. And JS is inherently difficult to compile to highly optimized code.