C++ programmers who want to write code targeting the CLR are now facing a rather complicated situation – the problem being that there is currently no C++ option that they can safely choose to write .NET code. Of course, there might be a few who would argue that we could use VC++.NET 2003 and use the managed extensions (MC++) – but, and it’s a very big “but” here, the problem is that the MC++ syntax is now obsolete. It will be supported in VC++.NET Whidbey through the /clr:oldSyntax compiler switch, but there is not much probability that it will be supported in future versions like Orcas (hope I spelled it right).
Not only that, when you start coding for Whidbey using C++/CLI, you’d then have to convert all your MC++ syntax code into the new syntax – even though you could get away with leaving some standalone code in the old syntax itself – but again that won’t be a very good idea nor a clean one. Another issue is that because of the differences in grammar between the old syntax and the new syntax, there is no one-to-one conversion option possible. So even if you come up with a few smart regexps and start converting your MC++ code into the new syntax, you’d still have to spend ages going through every single line of code to make sure things are okay.
Of course, now that the March 2004 Public Preview is out, you might be thinking that you could start writing .NET code using C++/CLI, but again you will be faced with a major problem. The C++/CLI compiler is still in a very early stage of infancy and most of the features have either not been implemented yet or been implemented in a slightly buggy manner – which is natural considering that it’s still in an Alpha stage as of now.
Now obviously Microsoft is not really at fault here – they brought out the MC++ syntax for us and got a lot of negative feedback from the developer community on the syntax/grammar. So they are now bringing out a much improved version which has even been standardized by the ECMA, but obviously they’d need time to get it up to shape. So essentially, while they are doing a very nice and civil thing for their trusted developer community, the major shift in syntax/grammar means that C++ programmers are left without a practical option for about an year and a little more.
The options for C++ developers are :-
- You could continue writing MC++ code until the C++/CLI compiler matures enough for it to be put to serious use
- You could start using the C++/CLI compiler once the first Beta is out
- You could stay away from .NET based coding with C++ until Whidbey is out
Of the three options (1) is not very smart and is actually pretty stupid if you consider everything. (2) is a bit risky, but C++ guys usually like to live on the edge and I’d strongly recommend that you go for it – you’d only have to wait another 3 months or so for the beta hopefully. (3) is obviously the safest option if you are okay with using C# for any unavoidable .NET programming requirements you might encounter.
Okay, that’s all I have to say for the moment. Now I’ll have to get Jambo and we’ll have to try and fix all those RSS feed errors that people have been reporting to us. There goes the weekend! *sigh*