Problems with the old Managed C++ syntax
The main complaint everyone had about the Managed Extensions to C++ was that the syntax was too ugly and twisted with all those double underscores thrown about. People also felt that compared to C#, MC++ was a second class .NET language and didn’t directly support the CLI, but used contorted workarounds – for example MC++ did not have a for-each keyword construct.
C++ programmers also found the poor integration between C++ and .NET a major disadvantage when they considered moving to .NET using MC++; for example you couldn’t use C++ features like templates on CLI types and you couldn’t use CLI features like garbage collection on C++ types. To make things more confusing, both unmanaged C++ pointers and managed reference pointers used the same
* based syntax which was quite confusing because
__gc pointers were totally different in nature and behavior from unmanaged pointers.
And there was another issue with code verification – MC++ produced executables were not verifiable and this was an area where C# had a big advantage over MC++ applications.
On October 6th 2003, the ECMA announced the creation of a new task group to oversee development of a standard set of language extensions to create a binding between the ISO standard C++ programming language and Common Language Infrastructure (CLI). It was also made known that this new set of language extensions will be known as the C++/CLI standard, which will be supported by the VC++ compiler starting with the Whidbey release (VS.NET 2005).
Advantages with C++/CLI
The C++/CLI standard proposed an elegant syntax and grammar for writing managed applications with C++. This gave a natural feel for C++ developers and allowed a smooth transition from unmanaged coding to managed coding.
C++/CLI offered first-class support to CLI features like properties, garbage collection, generics for both managed and unmanaged classes. C++/CLI also supported native C++ features like templates and deterministic destructors on both managed and unmanaged types. So essentially, C++/CLI successfully bridges the gap between C++ and .NET, and brings the best of both worlds to both unmanaged and managed programming.
And the icing on the cake is that the C++/CLI compiler outputs fully verifiable .NET code and now those annoying C# programmers can stop bragging about something their compiler does that the C++ compiler couldn’t do.
Oh well, I guess that’s it from me for the moment.