Home > Computing > C++ renaissance

C++ renaissance

Today I stumbled upon this very interesting comparison of which languages are used to write popular software (it was mentioned on Herb Sutter’s blog).

I encourage you to go through the table yourself and contemplate it. To sum it up, most of the popular software which we use every day is written in either C or C++. The author makes a point that other languages, esp. languages which don’t compile directly to executable machine code (a.k.a. native code), are still in a niche and always will be, because no matter how fast computers become, we will use their extra power and resources for new features instead of wasting them on non-native languages.

Back in the old days, when the Moore’s law directly influenced CPU frequencies, the advocates of non-native languages always used the argument that at some point CPUs will become so fast that native languages will lose their usefulness due to their clunkiness. Among other similar arguments.

The year 2006 came and CPU frequencies hit a wall. It turned out that in order to make further progress in performance CPU manufacturers have to start packing more and more cores into their products. We can leverage that in many algorithms which are parallelizable, but there is still a lot of things our programs have to do sequentially and there is no way to go around that. Sure multiple applications can leverage separate cores, but multiple cores don’t make miracles, we are stuck with a frequency limit!

Before the year 2006 everything went well, Java was at its peak and Microsoft promoted C# and .NET as their thing of the future. Today Microsoft backs C++11 and encourages developers to “go native”, while the future of C# is uncertain (there are fears that Microsoft will drop .NET).

When Google came out with its Chrome browser and revolutionized – if not leveled – the browser landscape, some of their most significant improvements went into the JavaScript engine. The Chrome browser was released in the midst of a JavaScript performance war between Firefox and Opera, but Chrome did it better. After years of improving their JavaScript engine Google declared that they gave up on JavaScript performance, they decided to develop a new language (Dart) which will be typed and will compile in browser into native code. Consider this: web scripting is important and performance of website scripts must improve, but to get there Google decided they can’t rely on a non-native language anymore! This does not mean that JavaScript will go away, but Google puts its bet on Dart which is a native language for the future of more sophisticated web programming.

I think non-native languages are still very useful for scripting, prototyping and other similar tasks where you need a simple language which does not have to produce lightning fast results. But non-native languages cannot replace native languages for more sophisticated tasks where the software must meet resource constraints. In other words, usefulness of Java, C# et al has been strongly overrated, they will remain niche languages at least for the next decade.

Update

A friend of mine pointed out that job postings indicate that Java is in higher demand than C or C++. That is a valid point, every language has its own purpose and application. It does not change the fact that non-native languages will replace native languages any time soon.

Advertisements
Categories: Computing
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: