JavaScript is the "VM" to target for D

Adam D. Ruppe destructionator at gmail.com
Sat Apr 24 14:30:22 PDT 2010


On Sat, Apr 24, 2010 at 04:54:17PM -0400, Nick Sabalausky wrote:
> Maybe I'm just naive about this, but it would seem to me that it should be 
> possible to have a single compiled-native-code format that could be "framed" 
> by the client to work on the whatever the client's OS is.

It probably could be done, especially if all calls were done through
a dynamically linked interface.

But it seems simpler to just recompile the source for the other platforms.

> Also, a web server could be set up to automatically convert or cross-compile 
> to whatever CPU or OS was requested by the client (and then internally 
> cached, of course).

Yes, this should work excellently. The cross-platform aspect is the easiest
thing to solve to me.

> I've still thought it was a bit silly to 
> have the clients do the JS compilation since 99% of it is all the same code 
> being sent out to all the different clients). Etc.

The biggest problem there is each browser would surely insist on having
their own separate bytecode.




More information about the Digitalmars-d mailing list