Thursday, July 3, 2008

Fistfight: Stroustrup vs Gosling

I’m in Paris at the moment at the OCTO conference. I had the pleasure of meeting Bjarne Stroustrup, the inventor of C++ at Bell Labs some 20-something years ago. He gave a keynote about C++, which was actually very interesting. I like to hear about the origins of technologies that stick but even more I love to hear about what the inventor would have done differently. I found it amusing that top of the list of regrets was that he didn’t require a “C++ Inside” badge for programs written in C++. I got the distinct feeling that Bjarne was a little jaded by the marketing and hype that Java received when it was launched and still gets today. He also felt that if they had release better libraries from day one there wouldn’t be the plethora of overlapping libraries we have in C++ today. Also C++ would be a different beast if there was a single vendor that “owned” the language and hence there would have been a marketing budget for it. Instead the C++ market place is very fragmented with vendors still offering their own flavours of C++, but at least the language itself is standardized by the ISO.

C++ is used heavily in high performance and extreme critical environments. He said that C++ is seeing resurgence in the embedded market, which obviously makes a lot of sense, but he also sees value in an open web framework in C++. I’m not so sure about that one.

What struck me when talking to Bjarne is that he still has huge enthusiasm for C++ even after 20+ years working on it. Spending that much time on any topic is bound to colour your judgment, and his answers to all questions about language seemed lead back to C++ even if you ask him to specifically talk about another language.

Interestingly, he didn’t think there would be another popular general purpose language in his lifetime just because there is no one vendor that will feel the need to invest heavily in a new language because the gains would only be incremental.

I asked him about his thoughts on functional languages to which he replied, “… they continue to struggle to get out of the Ghetto”. That made me chuckle.

Finally I mused whether he would in win a fistfight with James Gosling. He felt that there would be a “speed differential”, but said that if James got a punch in early he might go down. Personally, I think it would turn into a rolling bear hug coloured with clean language and grey hair. Bjarne said that he’d struggle to work up the aggression to go hard against James, though when I mentioned the performance comparisons of Java 6 and C++ published by SUN the fire was ignited.


Ignacio Coloma said...

I didn't switch from C++ to Java because of marketing. The whole headers thing was crazy and duplicated my work, and the macros features made the compilation process sluggish.

I think C++ lost the market's grip when they decided not to evolve according to the (reasonable) needs of the developers. Java came to fill that niche. If Stroustrup thinks it was a political thing it's ok, but _my_ reasons where entirely technical. Work was faster.

Dominique said...

What a joke!
Stroustrup missed Java success and he is going to miss functional language success too!
He don't see Java, and even more C#, are evolving in order to include functional features, like closures!
I have blogged about this evolution into different posts like Thoughts about Java, C# future and OCaml (?) relationships and More ramblings on programming languages.
One more (important) point. Multi-core programming is becoming harder and harder, and C++ is not high-level enough for catching the help of the compiler (to say things differently, C++ programming is too much fine-grained, and so, it is harder for a compiler to help for optimizations). Even the game industry is looking for new programming languages (especially functional ones, in order to express and exploit parallelism) for having a better programming productivity. See the paper "The Next Mainstream Programming Language: A Game Developer's Perspective", from Tim Sweeney (Epic Games), I mention into one of my posts.