«^»
3.2. What about C++?

The WWW page http://codeguru.earthweb.com/20AsWithRichter.shtml has an article that is entitled '20 .NET and C# Questions with Jeffrey Richter'. One of the questions is: We've seen managed extensions, but aside from that, what future does C++ have at MS and in .NET? Here is Jeffery Richter's reply:

‘C++ is unique in that it is the only Microsoft language that allows the developer to write managed and unmanaged code. So, I can easily see developers writing in unmanaged C++ for performance-critical algorithms and then using managed C++ for type-safety and component interoperability. I'm sure Microsoft will keep C++ going for years to come: device drivers need it, Windows is built with it, SQL Server, Exchange, and other BackOffice products will probably use C++ for a long, long time.’

The WWW page http://www.eponymous.eclipse.co.uk/csharpfaq.htm contains 'C# Frequently Asked Questions for C++ programmers'. The page is maintained by Andy McMullan. His answer to the question Does C# replace C++? is:

‘The obvious answer is no. However it's difficult to see C++ as the best choice for new .NET code. For the .NET runtime to function fully, it requires the programming language to conform to certain rules - one of these rules is that language types must conform to the Common Type System (CTS). Unfortunately many C++ features are not supported by the CTS - for example multiple inheritance of classes and templates.’

‘Microsoft's answer to this problem is to offer Managed Extensions (ME) for C++, which allows you to write C++ that conforms to the CTS. New keywords are provided to mark your C++ classes with CTS attributes (e.g. __gc for garbage collection). However, it's difficult to see why ME C++ would be chosen over C# for new projects. In terms of features they are very similar, but unlike C++, C# has been designed from the ground-up to work seamlessly with the .NET environment. The raison d'etre for ME C++ would therefore appear to be porting existing C++ code to the .NET environment.’

‘So, in answer to the question, my suspicion is that C++ will remain an important language outside of the .NET environment, and will be used (via ME) to port existing code to .NET, but I think C# will become the language of choice for one-time C++ developers developing new .NET applications. But only time will tell ... .’