Javascript bytecode

deadalnix deadalnix at gmail.com
Tue Dec 18 12:19:44 PST 2012


On Tuesday, 18 December 2012 at 18:11:37 UTC, Walter Bright wrote:
> 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.
>

Well, my experience is more like write once, debug everywhere. 
For both java AND javascript.

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

Isn't safeD supposed to provide that (as long as you never go 
throw trusted code) ?

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

Most thing can compile to javascript. The MOTO right now seems to 
be that if you can do it in javascript someone will. It don't 
mean someone should.


More information about the Digitalmars-d mailing list