D vs. C#

Sean Kelly sean at f4.ca
Mon Oct 22 17:22:51 PDT 2007


Walter Bright wrote:
> Robert Fraser wrote:
>> Walter Bright Wrote:
>>
>>> Considering that a C compiler exists for a far broader range of
>>> devices than VMs do, all the motivation that is needed is the
>>> language needs to be a) popular or b) have huge resources from a
>>> company like Sun to finance development of all those VMs. Sun could
>>> just as easily have provided a generic back end & library.
>>
>> I'm not o sure about that. For example, I did some development for
>> BlackBerry devices, which don't have a native code generator (or
>> spec) available outside RIM. All external BlackBerry applications
>> must be deployed in Java.
> 
> Why couldn't RIM provide a back end as easily as a Java VM? Like I said, 
> a simple back end could be as easy as:
> 
>     push operand
>     push operand
>     call ADD
>     pop result
> 
> Notice how close that looks to java bytecode! But it'll still execute 
> much faster.

The only advantage I've been able to think of for a VM is language 
interoperability.  The advantage of a VM over just an established 
calling convention and such being that it has better and more "native" 
support for garbage collected languages.  This was the point of .NET so 
far as I'm aware (ie. it was a COM replacement).


Sean



More information about the Digitalmars-d mailing list