Thursday, October 4, 2012

The return of native code Windows apps

Microsoft has been strongly encouraging the use of C++, native code, and even use of C++ for managed code. It seems they are poised to push C++ ahead of C#, perhaps because they know they need more efficient code for low-power mobile devices. Anyone who would say that C++ is a language past its prime has no idea what they are talking about, that's for sure. Despite the fact that all popular modern OSes are written in C or C++, application developers continue to favor C++, as do users.

The good news? These days we have what I like to call self-managed, unmanaged code. That is, unmanaged  (native) code that watches itself so closely that it performs like its own CLR manager, preventing errors and cleaning up any leftover debris (or at least notifying the developer of the condition). The basic CRT has even gotten more sophisticated, and secure. Take C++/CX for instance...

Here's a recent article on developing native C++ applications for Metro/Modern UI using XAML and native/unmanaged C++/CX style code: .. C++/CX being the latest thing (essentially C++/CLI syntax that compiles to native code). Clearly they are thinking they need native apps .. I figure it is for the low-power devices and the realization that some applications will need maximal performance. Otherwise, C# would be the thing to push, as for managed code development, it is much easier.

Other examples of the switch to unmanaged code can be seen in a variety of Microsoft applications (e.g. Microsoft Security Essentials, now Windows Defender), and those of other large corporations. AMD, for instance, switched the Catalyst drivers FROM .NET to native code several years ago.

No comments:

Post a Comment