D vs. C#

Walter Bright newshound1 at digitalmars.com
Mon Oct 22 02:14:29 PDT 2007


Derek Parnell wrote:
> On Sun, 21 Oct 2007 22:06:44 -0700, Walter Bright wrote:
> 
>> Derek Parnell wrote:
>>> On Sun, 21 Oct 2007 19:19:39 -0700, Walter Bright wrote:
>>>
>>>> Jussi Jumppanen wrote:
>>>>> I think Microsoft's longer term vision is to have .NET everywhere
>>>>> and I mean everywhere.
>>>> I've never been able to discover what the fundamental advantage of a VM is.
>>> It's easier to change the functionality built into a VM than it is for
>>> hard-coded silicon.
>> Since the VM ultimately runs on that silicon, it's hard to see how.
> 
> I suspect that we are talking about different things. When I say "VM" I'm
> referring to a Virtual Machine, that is, a CPU instruction set that is
> emulated by software. Because it is a software based emulation, it is
> easier/cheaper/faster to modify that silicon chips. The fact that a VM (the
> software) runs on a real machine is totally irrelevant to the reasons for
> having the VM.

I mean a VM like the Java VM or .net VM.

> For example, I might have a VM that enables me to run Commodore-64
> executable files on my Intel PC. Or another VM that runs Knuth's MIX
> instruction set. In many cases a VM is an idealized machine being emulated,
> and compilers can create object code for the idealized machine. This is
> then run on real machines of totally different architectures. If the
> idealized machine is enhanced, only the VM is updated and the silicon chips
> running the VM don't have to be replaced. A real boon if you are selling
> software for the various proprietary CPUs embedded in devices to the mass
> consumer market.

If the source code is portable, i.e. there is no undefined or 
implementation defined behavior, there's no reason that the VM object 
code should be more portable than the source. (And remember all the 
troubles with Java VMs behaving differently?)



More information about the Digitalmars-d mailing list