RDN Express Blog

Blog archive

Native Code Makes a Comeback

Has the .NET revolution been replaced by a C++ renaissance? Not at Microsoft.

You may have noticed over the summer that Microsoft started to offer "GoingNative" sessions on Channel 9, and continued to talk about a C++ renaissance, a phrase that the company coined as it recommitted to advancing C++ functionality in Visual Studio 2010, which offered support for upcoming C++11 (formerly called C++10x) language features like re-value references and lambda expressions. The initial changes seemed promising to some C++ developers, although features like C++/CLI IntelliSense never made it into the IDE or the VS2010 Service Pack 1.

But native developers who downloaded the Visual C++ for Visual Studio 11 Developer Preview were not happy when they saw the lack of core C++11 language features in the early VS11 tooling. Microsoft admits that its VC++ compiler is behind competitors in terms of C++11 compliance, the latest version of the C++ language, which was ratified in August. And the company has acknowledged that most of that won't change in the upcoming release (see C++11 Core Language features table). Microsoft did update the C++ Standard Library and extended its proprietary Parallel Patterns Library (PPL), which will also now support Linux.

In late September, C++ developer Jalf created "Speed up work on VC++" on the UserVoice forum and more than 1,031 developers have since voted in agreement.

"It is obvious, from looking at the amount of unfixed bugs, and the woeful C++11 feature support, that the VC++ team is understaffed," Jalf wrote in his forum post. "For a company bragging about its "C++ renaissance", that's just absurd. For the sake of all your C++ customers, you really need to speed things up. I won't dictate *how* it should be done, but I can think of three obvious suggestions…"

He and others suggested that Microsoft either devote more resources to VC++, open source it or think about licensing a compiler.

Many developers wonder if Microsoft was so focused on creating proprietary frameworks (WinRT C++/CLI) and language extensions (C++ AMP) that they didn't have the resources to advance the compiler. Herb Sutter, Microsoft's principal architect of C++, explained during a BUILD session, Writing modern C++ code: How C++ has evolved over the years, that those efforts got first priority but Microsoft also worked on a new C++11 language feature, namely variadic templates (support for a variable number of arguments), that didn't quite make it into VS11.

Microsoft is taking steps to reach out to its C++ community, however. On February 2-3, the company is hosting a GoingNative 2012 conference on its Redmond campus with Herb Sutter, and keynoter Bjarne Stroustrup, the creator of the ISO standard C++, slated to offer sessions that will be streamed live and available on demand within 24 hours.

"This is Microsoft's first native-code-only developer event in years, and it's not limited to Microsoft products or technologies -- it’s about ISO C++ on all platforms," Sutter explained in a blog about the conference. "We're taking the initiative to put on this event because we know that there's a huge demand for information about the new ISO C++11 standard, but that information is still really hard to come by -- the standard was just published last month, none of the major books has been updated yet to reflect it, and high-quality public information is just starting to trickle out…"

Registration to attend the conference in person is $112 and the facility has capacity for about 350 people, according to Sutter.

Express your thoughts on Visual C++ 11. Did Microsoft focus its development resources on the new WinRT and miss key Visual Studio 11 updates? Drop me a line at krichards@1105media.com.

Posted by Kathleen Richards on 12/06/2011 at 6:48 PM


Reader Comments:

Tue, Dec 13, 2011 Ras Fred USA

I'm afraid that this renaissance is the showing of dirty laundry between the Visual Studio portion of the company that is focused on CLR and a Windows team that is a C++. Hence the rewrite of .NET functionality in WinRt? I would like to see MS take the plunge dogfood on .NET Framework. A little openness on their recent changes would be great too.

Tue, Dec 6, 2011 Dr Alexander Turner United Kingdom

I also do not see a renaissance. However, it does feel like one. For many year MS have been pushing the idea of moving everything to managed code (even the OS with Singularity etc.). That push seems to have ended. The change can feel like a renaissance where what it really is is an acceptance that native is not going anywhere. One small thing - on automatic garbage collection - I think you are thinking about C. A lot of C++ does use automatic garbage collection via auto or smart pointers. Also, it is worth noting that a huge amount of C++ is still written in the financial industry.

Tue, Dec 6, 2011 Kirk Bangkok, Thailand

Hopefully I don't get flamed for this, but from what I've seen as a developer, native code is used in only a small minority of projects. Obviously, 3D gaming, and certain other niches (high-performance components, or cross-platform apps that were written in C++ and need to be recompiled) are going to be done in native code, but LOB apps, web-apps, ordinary desktop software, and so on, are done in managed code because it's faster to develop, less prone to bugs related to memory/pointers, and has automatic garbage collection. Processors in typical notebooks are 20x - 30x more powerful than when the .Net framework was introduced, and the CLR is sufficiently well-written that performance of .Net apps (or Java apps in the JVM) are fine for most purposes. I'm not knocking native code - some things *need* to be written in native code. But a "renaissance"? I don't see it...

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above