Hail the return of native code and the resurgence of C++

Interpreted languages and virtual machines are all well and good, but a new version of C++ signals renewed interest in old-fashioned native binaries

Programming language trends come and go. First, Java is the hot new language, then it's Python, then Ruby steals the limelight, then it's back to JavaScript. But the latest language darling is probably the last one anyone expected. Believe it or not, 2011 could be the year of C++.

Last week, the latest version of the ISO C++ Standard was approved by unanimous vote. It's the first major revision of the language in 13 years. Now officially known as C++11, the new standard introduces features designed to make it easier to develop software for modern parallel processing architectures, including lambda expressions and new data types for concurrent computing.

[ Get software development news and insights from InfoWorld's Developer World newsletter. | And sharpen your Java skills with the JavaWorld Enterprise Java newsletter. ]

Not that C++ really ever went away. With its older cousin C, it remains one of the most popular languages for systems programming and for applications that call for performance-intensive native code, such as 3D game engines.

Outside its specialized niches, however, traditional systems programming itself has fallen out of favor in recent years. Modern programmers have increasingly turned away from native compilation in favor of managed-code environments such as Java and .Net, which shield them from some of the drudgery of memory management and input validation. Others are willing to sacrifice some performance for the syntactic comforts of dynamic languages such as Python, Ruby, and JavaScript.

But C++11 arrives at an interesting time. There's a growing sentiment that the pendulum may have swung too far away from native code, and it might be time for it to swing back in the other direction. Thus, C++ may have found itself some unlikely allies.

Native code's unlikely champions include Google
Google is probably the last company you'd expect to be interested in native code. For years, it has championed the idea that the very concept of desktop software is obsolete. In Google's ideal world, applications run exclusively in the browser -- and it has developed Chrome OS to prove it.

Yet even Google recognizes that sometimes interpreted JavaScript isn't enough. In past columns, I've covered Google Native Client (NaCl), the sandbox environment that allows the Chrome browser to download and execute native binaries to handle performance-intensive operations. It's no idle experiment; Google shipped a new version of NaCl in the latest beta version of Chrome last week, and for the first time the technology is enabled by default. Rumor has it, too, that the Netflix streaming support Google quietly slipped into the most recent build of Chrome OS also relies on NaCl APIs.

NaCl isn't Google's only nod toward native code, either. The search giant's Go programming language has been widely described as "Java-like," but that's only partially true. Syntactically it does resemble Java in some ways, but Go code does not run in a virtual machine; it's compiled directly to native code. What's more, Google has gone so far as to make sure that Go binaries can run not just on the desktop, but in the Google App Engine cloud computing environment as well.

1 2 Page 1
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.