D vs. C#

David Brown dlang at davidb.org
Sun Oct 21 22:27:11 PDT 2007


On Sun, Oct 21, 2007 at 10:08:26PM -0700, Walter Bright wrote:
> Robert Fraser wrote:
>> Walter Bright Wrote:
>>> I've never been able to discover what the fundamental advantage of
>>> a VM is.
>> I'm sure there are a lot of advantages, but here's one I can think of
>> off the top of my head: say you're designing an application for
>> mobile devices/smartphones. There are a lot of different phones out
>> there, probably all with different APIs (or no native API accessible
>> outside the company that made the phone), but if your software is
>> running in a VM it'll run the same everywhere. Now say you're a cell
>> phone manufacturer introducing a new smartphone -- adding the VM
>> makes all the software written to use that platform instantly
>> compatible with your device.
>
> That isn't an advantage of the VM. It's an advantage of a language that has 
> no implementation-defined or undefined behavior. Given that, the same 
> portability results are achieved.

It's still a VM advantage.  It helps the model where there are many
developers who only distribute binaries.  If they are distributing for a
VM, they only have to distribute a single binary.  Otherwise, they still
would have to recompile for every possible target.

Dave



More information about the Digitalmars-d mailing list