scope keyword - a maintenance nightmare?

Sean Kelly sean at f4.ca
Sat Aug 18 08:34:49 PDT 2007


James Dennett wrote:
> Sean Kelly wrote:
>> Guenther Brunthaler wrote:
> 
> [snip]
> 
>>> Or let's put it the other way: D might be a valid competitor to JAVA,
>>> but it still has not got what it takes to replace C or C++ as system
>>> programming languages. It just takes more to challenge C++ than D can
>>> provide at the moment.
>> Since C++ will be adding garbage collection in the next iteration of its
>> standard, I don't see its presence in D as a particularly strong
>> argument for why D cannot compete with C++.
> 
> There's one fundamental difference: C++ language features
> and standard library are GC-neutral, i.e., will work with
> or without GC.  GC is more inherent to D (which means that
> D can benefit from certain simplifications, but also that
> you can't use so much of D if you're in a situation where
> GC isn't an acceptable option).

True enough.  But for the record, the only D feature that absolutely 
relies on garbage collection is associative arrays.  Normal arrays can 
be used without GC so long as concatenation operations are excluded, and 
the remaining features are all fine.  The greatest difference between D 
and C++ for memory management is the lack of object value semantics in 
D, since smart pointers have become such a popular tool in C++.  It's 
probably more appropriate to compare D to C here.


Sean



More information about the Digitalmars-d mailing list