D vs. C#

Radu radu.racariu at void.space
Mon Oct 22 06:26:22 PDT 2007


Joel Lucsy wrote:
> Walter Bright wrote:
>> With a portable language, it is not necessary to distribute binaries. 
>> You can distribute the *source* code! Then, the user can just 
>> recompile it on the fly (this can be automated so the user never has 
>> to actually invoke the compiler). Just like how Javascript is 
>> distributed as source.
>
> .Net does not run in a VM, it is JIT compiled down to machine code. 
> Assemblies *are* essentially source code. And, I belive in most cases, 
> Javascript is either run on a VM, or JIT compiled just like .Net. And 
> I suspect most browsers currently don't do JIT.
>
Any system or collection of services that translates an abstract 
instruction set to a concrete one is a virtual machine: 
http://en.wikipedia.org/wiki/Virtual_machine (Process virtual machine).
Leaving behind the MS propaganda, the implementation of such an system 
can be done as an interpreter, JIT, a combination of both + runtime 
profiler or as AOT + JIT (+ Interpreter).
Currently MS's .Net uses a JIT and sometimes an AOT(ngen) implementation 
(they are working together), while the Sun Java implementation uses a 
combination of an interpreter, a JIT and a runtime profiler.
Java has a larger set of implementations including AOT + JIT (JET 
Compiler), only AOT or AOT + Interpreter (GCJ), Interpreter (SableVM), 
JIT (Cacao).

*AOT : http://en.wikipedia.org/wiki/AOT_compiler
*JIT: http://en.wikipedia.org/wiki/Just-in-time_compilation



More information about the Digitalmars-d mailing list