Microsoft Drags Its Feet On C++ for .NET Core |
Written by Mike James |
Friday, 04 October 2019 |
A recent blog post promises that C++/CLI will be available in the next version of .NET Core. but this begs the question of why it isn't available in this version of .NET Core. Does C++ love .NET? There has long been deep suspicion that the C++ team really doesn't like .NET. I've no proof and I'm sure they would deny it, but why should they like .NET, which provides C#, a language that it arguably a much better object-oriented C and an object technology that makes COM look complex and difficult to use? However, the C++ team has tried to support .NET, but when you review its history it looks something of a mess. The first attempt, in 2002, was Managed C++, which introduced new syntax to allow it to work with the .NET runtime and compile to CIL rather than machine code. It was replaced in 2004 by C++/CLI, which attempted to simplify the syntax and establish a standard extension to C++. It was standardized by ECMA and is the only way to create .NET C++ programs. Recently, however, C++/CLI has been notable by its absence from any future planning documents and there has been little sight of it in the open sourcing of .NET. Part of the reason for this was the introduction of WinRT. Instead of .NET and C++/CLI, the C++ group had more enthusiasm for the C++/CX extension to the C++ language, which borrowed some of the syntax from C++/CLI but targeted non-managed code designed to run under WinRT. That is, C++/CLI was the C++ way to create UWP apps and avoid any contact with .NET or managed code and get back to COM-like runtime objects. No doubt if UWP and WinRT had proved successful, and not the underwhelming unnecessary technology for a phone that the world couldn't be persuaded it needed, then my guess is we would have heard less and less of C++/CLI and indeed of .NET. As things stand the world is a different place and the C++ group is now ready to support C++/CLI, but not until the next version (3.1) of .NET Core. At the moment if you want to use .NET Core 3.0 then you can't use C++/CLI. As outlined in .NET Is One With .NET 5, .NET Core 3.1 is intended to be the last of the "Core" versions of the open source framework, and will be renamed .NET 5.0, signalling the fact that it is only version of the framework going on into the future. So including C++/CLI in .NET Core 3.1 is about as late as it could have been left. Put another way, if C++/CLI did not support .NET Core 3.1, it would not work on any current version of the framework. However better late than never, and if .NET is to go forward as a leading technology it needs C++/CLI and enthusiastic support from the C++ team. While other .NET languages, such as C# can target any platform that runs .NET Core, C++/CLI only targets Windows - which is odd considering that if it targets CIL it would produce code that should run on anything. However C++/CLI produces some machine code that makes it platform-specific. All we really know is that C++/CLI will be available under the next version of .NET Core. What we don't know is whether it is going to remain in maintenance mode or be enhanced with new features and made cross-platform in however limited a way. I guess this means the future of C++/CLI, and wholehearted support from Microsoft of .NET, is still in doubt. More InformationThe Future of C++/CLI and .NET Core 3 Related Articles.NET Core 3 - Microsoft Is Almost Back Where It Started C++ Going Native - Inside C+/CX design Building and using C++ WinRT components Microsoft Asks For Help On The Future Of .NET - Where Do We Start? To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
Last Updated ( Friday, 04 October 2019 ) |