D vs VM-based platforms
Walter Bright
newshound1 at digitalmars.com
Mon Apr 30 10:06:47 PDT 2007
Jascha Wetzel wrote:
> This point is actually only about standard libraries, not VMs.
> As i see it, VMs actually are only about portability. Portability in
> theory also means better (more individual) code optimzation.
> VMs also make compilers a lot simpler. the difficult, platform dependent
> part of code optimzation lies in the VM.
The thing is, you don't need a VM to get such portability. You need a
language that doesn't have implementation defined or undefined behavior.
It's *already* abstracted away from the target machine, why add another
layer of abstraction?
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!).
More information about the Digitalmars-d
mailing list