D vs. C#

Bruce Adams tortoise_74 at yeah.who.co.uk
Mon Oct 22 04:18:52 PDT 2007


Walter Bright Wrote:

> Roberto Mariottini wrote:
> > David Brown wrote:
> >> On Sun, Oct 21, 2007 at 10:08:26PM -0700, Walter Bright wrote:
> > [...]
> >>> 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.
> > 
> > And not only that: if my product is compiled for Java-CLDC it will work 
> > on any cell phone that support CLDC, based on any kind of 
> > processor/architecture, included those I don't know of, included even 
> > those that today don't exist and will be made in the future.
> 
> Javascript is distributed in source code, and executes on a variety of 
> machines. A VM is not necessary to achieve portability to machines 
> unknown. What is necessary is a portable language design.

Imagine it as a compatibility layer or a shared library. If my OS supports POSIX I can develop for POSIX. If I develop for windows as well I have to learn and use other APIs. A VM is just a special kind of API that provides a language backend and interpreter.




More information about the Digitalmars-d mailing list