Javascript bytecode

Walter Bright newshound2 at digitalmars.com
Tue Dec 18 10:11:37 PST 2012


An interesting datapoint in regards to bytecode is Javascript. Note that 
Javascript is not distributed in bytecode form. There is no Javascript VM. It is 
distributed as source code. Sometimes, that source code is compressed and 
obfuscated, nevertheless it is still source code.

How the end system chooses to execute the js is up to that end system, and 
indeed there are a great variety of methods in use.

Javascript proves that bytecode is not required for "write once, run 
everywhere", which was one of the pitches for bytecode.

What is required for w.o.r.e. is a specification for the source code that 
precludes undefined and implementation defined behavior.

Note also that Typescript compiles to Javascript. I suspect there are other 
languages that do so, too.


More information about the Digitalmars-d mailing list