News for hackers. Stuff that matters.
Re:Should JavaScript be split into two languages? Google pro... by thayne on Saturday October 26, 2024 @03:53PM (#41957256)
> because the shippable code isn't bytecode,

But what if it was?

What I would like to see is:

- a bytecode "language" that roughly corresponds to Javascript semantics, and that is what the engines interpret (and JIT compile)

- browsers still include a compiler to compile JS sourcecode to the bytecode. Possibly wasm could work, although it would need a lot more functionality, like native support for GC, and DOM access, etc.

- browsers include a disassmbler/decompiler to improve debugging the bytecode

Then simple sites, and development can use plain JS source, but for higher performance you can just deploy the pre-compiled bytecode.

Re:Should JavaScript be split into two languages? Google pro... by alpaca128 on Saturday October 26, 2024 @04:36PM (#41957551)
I am certain this would mainly add problems while not improving performance as websites would just add more stuff on top until it's again on a barely tolerable level, for both the user and the developer who know probably has to manage yet another super simple, blazingly fast tool to keep everything running.