D vs VM-based platforms

Jan Claeys usenet at janc.be
Mon Apr 30 11:32:38 PDT 2007


Op Mon, 30 Apr 2007 10:06:47 -0700
schreef Walter Bright <newshound1 at digitalmars.com>:

> I just don't get the reason for a VM. It seems like a solution
> looking for a problem.
> 
> As for the "makes building compilers easier", that is solved by
> defining an intermediate representation (don't need a VM), and
> building front ends to write to that intermediate representation,
> building separate optimizers and back ends to turn the intermediate
> representation into machine code. This is an old idea, and works fine
> (see gcc!).

But what people call a "VM" is in fact an interpreter or a (JIT)
compiler for such an "intermediate representation"...   ;-)


And I think in the case of dynamic languages like Python, a JIT-compiler
often can create much better code at run-time than a compiler could do
when compiling it before run-time.


-- 
JanC



More information about the Digitalmars-d mailing list