Re: Thinking Clearly

Brian Moelk wrote:

Randy Magruder wrote:
Because it makes a lot of sense and offers a better
migration/integration story for .NET.

How so?

I think I'll let someone else explain it for you since I'm almost
certain that you'll think it's a bad idea. If no one wants to step
up, I'll let you do your own research.

According to Wikipedia:

Advantages of using Managed C++ over unmanaged code

* Managed and unmanaged code can be mixed together in the same
assembly seamlessly. This allows the programmer to keep unmanaged code
that cannot be ported over to the .NET Framework without re-writing it
completely. Some ramifications of using this hybrid convention are
present though.

* Managed C++ is the only language able to natively communicate
with all other .NET languages and native unmanaged C++ code. Managed
C++ is thus very convenient for interoperability between programmers
who use different languages, including those in the .NET theatre and
those who use unmanaged C++.

Disadvantages of using Managed C++ over unmanaged code

* Managed C++ introduces a lot of new keywords and syntactic
conventions that can impede on the readability of managed code,
especially if C++ code is included directly and interacts directly with
Managed C++ code in the same assembly.

* Like in Java, there is the presence of an unnecessary overhead of
features that most Managed C++ programmers and programs don't really
need. This will reduce performance on most applications. The overhead
of Managed C++'s specific implementation of garbage collection is the
main performance inhibitor. In almost all performance-critical
applications, unmanaged native code is the preferred option.

* Managed C++ is superseded by C++/CLI and thus obsolete as C++/CLI
has been standardized.

* Managed C++ does not support ASP.NET web applications, which is a
capability supported by all languages targeting the .NET Framework,
including other third party languages.

* Managed C++ requires a slightly longer development time than
other .NET languages that could be applied to projects that still
produce the same result, since the implications of pointers in C++ are
still required, even in managed C++ code.

* Managed C++ is a language only readily usable by programmers
already familiar with C++ or another derived language. Visual Basic
programmers, for example, will have trouble implementing Managed C++ in
their solutions, while C# programmers, though they may have some
difficulty, can adopt to Managed C++ quicker.

* Managed C++ includes no support for generic programming. C++/CLI
is to support this though.