Spotlight: C++ is still cool

Mike_gualtieri_lamp Sometimes enterprise IT development shops that are doing development in Java, C#, VB.NET forget that it all began with C++. Invented in 1981 by Bjarne Stroustrup, C++ was arguably the first popular object-oriented language even though languages like Smalltalk proceeded it. Java was first released by Sun in 1995, fourteen years after C++ was invented.

C++ is alive and kicking as I was reminded by the 300 C++ programmers at the Qt Software Developer Days Conference last week in Redwood City where I gave a keynote on the Future of Application Development. Qt Software, formally named Trolltech before being acquired by Nokia late last year, develops an impressive cross-platform application framework used primarily by C++ programmers. Using Qt, programmers can develop applications and user interfaces once, and deploy them across many desktop and embedded operating systems without rewriting the source code. Qt supports well-known platforms such as Windows, MacOS, Linux, Windows CE, and others.

Why use C++ and Qt?

With all of the other choices in languages and frameworks such as .NET managed code and Java, you may be asking why C++ and Qt? Here is what the overwelmingly loyal developers told me:

  • Qt provides an elegant, intuitive approach to a user interface framework. I asked all the developers I could and the unanimous answer is that Qt is designed the way they would design a framework. It is intuitive to use and has great documentation.
  • If it has to be as fast as possible, it has to be in C++. C++ is very fast because it is still compiled and linked the old fashioned way. Unlike Java and .NET and scripting languages there is nothing in between. C++ converts to machine code. So for user interface applications that have lots of visualations and graphics speed is paramount.
  • Qt is cross-platform. Applications developed in Qt are cross platform. They will run just as well on Windows as on the Mac. Skype is a great example of a cross-platform application developed using Qt.
  • Embedded applications usually have less memory and power. The efficiency of C++ and Qt on embedded or mobile platforms is an advantage because many of these devices need every ounce of performance they can get out of smaller embedded processors.

C++ and Qt is a good choice if your application needs to be cross-platform and high-performance.

Some cool applications using C++ and Qt

  • High End Systems developers entertainment lighting for shows and concerts. High End Systems develops the lighting systems used by large shows such as the 2008 Summer Olympics and U2 rock concerts. Their lighting consoles need to support very custom user interfaces and need to support software updates that will still perform on older equipment.
  • Dash Express is an internet connected real-time traffic routing device. Dash Express is a GPS device that is also internet connect while you are driving. It reports traffic in real-time and can provide real-time routing. The Dash had to develop a simple user interface and cram all of that on a small device that mounts on the dashboard of a car.

So when you are developing web applications in Java or C#, pause every now and again to remember their roots. And, if you want to do some cool work on embedded devices consider picking up C++; there are plenty of jobs available.

Comments

re: Spotlight: C++ is still cool

Mike, WOW! Someone is NOT blowing the Java horn? Now I am really surprised. I was very impressed when we met but now you truly make sense. I could not agree more. With Java 1.4 at the end of its support life-cycle and 1.5 not much behind the true cost of Java will be seen and the myths of its portability will soon end. And then you propose another NON-Microsoft and NON-RIA user front-end like QT? Where do you take the guts from?Anyway ... the ISIS Papyrus Platform for process and content management is also a C++ and QT based system! We took it a step further because the fully end-user configurable GUI functionality implemented with QT is managed in our WebRepository and also available in Flash and Ajax. So with Papyrus you get the best of ALL WORLDS.Programming language, GUI ... that just leaves you to cover what else is there on the database end, right? We use Berkeley DB (now Oracle) as the base for the Papyrus object-relational database. What? Not SQL and not Oracle or Microsoft? Once again it is unusual, but like you we make our choices with our brains and do not just do what everyone else does.Thanks again for documenting that there is life beyond Java. Yes, C++ is fast and makes a system very manageable. But seriously, performance is not just important for embedded systems but also for large cross-platform application environments like Papyrus.

re: Spotlight: C++ is still cool

I'm not a fan of Java. I like C++ and Qt, too. But do you really think you get an unbiased opinion from C++/Qt developers towards 'their' development platform? Pointing out pros without cons is rather pointless as other programming languages and other GUI frameworks can also easily point out their strengths.

re: Spotlight: C++ is still cool

Thanks for your comments. I am not advocoating C++ over Java or .NET. Rather I am pointing out to enterprise IT developers that C++ has a purpose for certain types of apps such as embedded apps and high performance apps. Most console and PC games are written in C++ for that reason. You would not write a web application in C++. You'd use Java, .NET, Ruby, PHP, or Python.

re: Spotlight: C++ is still cool

Good points.There are a few alternatives to QT, BTW, that I recently found:- wxWidgets- BoostBoost will not deal with UI, though. But sometimes you don't want to. for example, when you build a skinned application with fancy UI that QT cant support (or can it ?)Sometimes you need to make an app cross platform, where the app is already built. I believe moving it to a QT framework will take a LOT of work. at such times, I would consider using Boost to take it one step at a time