An Interview With
Bjarne Stroustrup
Ordinarily, this is the space where I subject you to my strange observations and questionable wit. This month, however, I've got a treat for you. Bjarne Stroustrup, the designer and original implementor of C++, and the author of The C++ Programming Language and The Design and Evolution of C++, kindly agreed to an interview with Visual C++ Developers Journal.
The following is just a small sample of Stroustrup's views on the state of C++; you can find the entire interview online here. Make sure you go thereit's a must-read.
On designing languages vs. programming: I consider writing programs far more interesting than programming language technicalities. I think that you should consider designing a new language only when there is something you can't reasonably express in the existing ones, and C++ serves me well for most of what I'm doing.
On Visual C++: Microsoft [needs] to get its act further together vis-à-vis the standard! VC++ has been improving, but Microsoft has the resources to further improve standards conformance and provide a higher-quality support for core language facilities and the standard library. For example, as for most current C++ implementations, the messages from errors in templates leave much to be desired.
In the area of conformance, things are much better than they used to be, but I still miss template friends and partial specialization in VC++. I'd love to see someone implement separate compilation of templatesan important facility I have not been able to use since the Cfront days.
A slight increase in the resources devoted to the standard library compared to the resources devoted to proprietary extensions and facilities would be the cheapest way for Microsoft to help the largest number of programmers.
The performance of the generated code is generally good. Implementations tend to differ based on the differing concerns of the user communities. I think that the most significant gains are to be had in tuning the standard library. For example, reading a sequence of characters into a string from an istream is an operation worth optimizingif for no other reason than not to tempt programmers to fiddle around with character reads, explicit buffering, allocation, pointers, and so on.
On Java hype: There is still an amazing amount of Java hype around. Despite Java's track record over the last five years, hordes of enthusiasts seem to believe that Java will soon displace not only C++, but also just about every other programming language. On the other hand, C++ use still appears to be growing. I suspect the main effect of Java on C++ has been to divert effort that would have led to better C++ tools and libraries into building the Java platform and several Java toolsets. Very little in Java is new to a student of programming languages, so there has been little effect on the C++ definition. In that area, Java is still playing catch-up.
On the "fading popularity" of C++: I haven't noticed C++ being used less than before. On the contrary, the indicators I see point to the usual steady increase in C++ use. However, a steady increase in use from a huge base, increase in standards conformance, increase in portability, and improvements in libraries do not lend themselves to hype. I think the "fading" is primarily a marketing/press phenomenon.
C++ is still my favorite language … it has no match when it comes to writing code that is simultaneously efficient and elegant for a wide range of application areas and platforms.
I think you'll agree with me that the C++ development community is lucky to have Stroustrup as an outspoken visionary. As he champions real-world use of C++ (while simultaneously sending a reality check to Microsoft) and reigns in the runaway Java train, we all stand to benefit.