MIT Technology Review: An Interview With Bjarne Stroustrup

zz zz at zz.com
Tue Dec 5 13:06:51 PST 2006


Sean Kelly wrote:

> There is no debating the fact that C++ has been an incredible success, 
> and it still has very little competition in many core markets. 
> Personally, my only real problems with the language are that its 
> popularity has driven it to be used in projects and by people where 
> another language would be more suitable, and the language supports such 
> a wide array of programming styles that it is extremely difficult to 
> maintain any kind of design coherence in large team projects.  Also, its 
> age is such that many projects contain code written before templates 
> even existed, and so a substantial codebase follows "old style C++" 
> which is heavy with raw pointers, casts, etc.  In fact, I'm continually 
> amazed at how little new code I see even today that is written using STL 
> components.  IMO this is a strong argument for D's built-in dynamic 
> array support and other features, as there is no doubt in my mind that 
> one of the major problems with C++ is that the language was standardized 
> and in use before the library was up to snuff.  By integrating these 
> features into the core language, Walter has neatly sidestepped this 
> problem and provided a nice, clean syntax for some of the most commonly 
> used programming constructs.

I agree with everything you mention above but there are cases where C++ 
will just be a better due to performance and nothing else.

I did some work in D recently that is being used at a client's place and 
it took about 2 hours to design and write (it's was not something that 
was performance critical), one of my work mates got interested in D and 
for the sake of curiosity we ran some test comparing D's built in arrays 
with boost::ptr_vector which we use quite a lot and the results were as 
follows:
VS2003 = ~3.75 secs
VS2003 with NedMalloc = ~1.35 secs
DMD = ~ 7 secs
We could not get DMC to compile Nedmalloc so we dropped testing DMC with 
c++.

While he liked that language and said the he might actually use it to 
prototype idea's, he will not use it in production code due to the 
performance.

Conclusions:
D is great, but DMD will have to do something about it's performance for 
some applications.

Zz
> 
> Sean



More information about the Digitalmars-d mailing list