D vs Java

Sean Kelly sean at f4.ca
Wed Mar 22 10:15:44 PST 2006


Matthias Spycher wrote:
> Dave wrote:
>>> 2. Languages like Java have the advantage that they don't expose the 
>>> actual layout of objects in memory to the programmer. Any language 
>>> with pointers has a disadvantage in the context of dynamic optimization.
>>
>> If you're talking about the famous "pointer alias problem" then Java is
>> certainly not immune to that (maybe even less so because of all of the
>> references floating around).
> 
> True, but accurate garbage collection is a requirement if you're going 
> to scale to support large, long-running applications. C-pointer 
> functionality eliminates the potential. The D community might (in the 
> future) consider the introduction of a managed D subset that would make 
> accurate GC possible.

The D standard doesn't have any language that prevents this.  I think it 
would be quite possible to implement an incremental GC in D if one had 
control over code generation.

> I agree it's not easy, especially for asymmetrical multi-core processors 
> like Cell. Time will tell. I don't believe dynamically compiled apps 
> will consistently beat the equivalent statically compiled program. But 
> for many apps the performance difference will probably be similar to 
> that between an assembly program and the equivalent C/C++ 
> implementation. And that will have to be weighed against all other 
> factors, e.g. productivity during development, deployment costs, 
> maintenance, etc.

I suppose it's a good thing that there's nothing stopping someone from 
compiling D code to a VM target either :-)


Sean



More information about the Digitalmars-d mailing list