Why use C++ .NET?

  • Thread starter Thread starter Walter
  • Start date Start date
W

Walter

I am a C++ developer, and I've been playing around with
C++ .NET, which apparantly compiles to the same IL as VB!!
Based on this, I'm deciding that I'm going to stick with
unmanaged C++. Does anyone have any good reason to use
C++ .NET over VB or C#? I don't see the point.
 
Walter said:
I am a C++ developer, and I've been playing around with
C++ .NET, which apparantly compiles to the same IL as VB!!
Based on this, I'm deciding that I'm going to stick with
unmanaged C++. Does anyone have any good reason to use
C++ .NET over VB or C#? I don't see the point.


To us who don't know VB this *is* the point. You can produce a .NET
application while still using C++. The compiler guys also claim that
the C++ compiler optimizes the IL a little better, if that is
important.


Bo Persson
(e-mail address removed)
 
Walter said:
I am a C++ developer, and I've been playing around with
C++ .NET, which apparantly compiles to the same IL as VB!!
Based on this, I'm deciding that I'm going to stick with
unmanaged C++. Does anyone have any good reason to use
C++ .NET over VB or C#? I don't see the point.

Managed C++ is the only language environment that provides a (somewhat)
seamless bridge between the managed and unmanaged worlds, while VB.NET and
C# only offer PInvoke and COM Interop. As Another respondent mentioned, the
C++ compiler also produces more optimized IL than the VB or C# compilers.

In the next major release of the .NET framework & languages, VC++ will have
more advantages that can't be talked about just yet - but I believe that
they'll be compelling.

-cd
 
I use managed C++ where I need to bridge existing C / C++ code with the
managed world or when I'm going to do lots of win32 stuff that I want
wrapped in a managed interface. I do find the syntax for the managed
extensions a bit weird (but usable). e.g. The C++ for internal is "public
private".

I love using C#, I find it better linked with the environment than C++,
(Auto complete works 99% of the time). When generics comes in (similar to
templates) it will be even better.

I wouldn't touch VB with a barge pole.

Regards
Lee
 
Walter said:
I am a C++ developer, and I've been playing around with
C++ .NET, which apparantly compiles to the same IL as VB!!

Hi Walter,
I think everyone else has made a good case for advantages of using C++ for
..NET programming, but I do want to clarify one thing from your statement
above. The Visual C++ compiler (version 2002 and version 2003) _can_ produce
the same IL as VB... it doesn't have to. It can still produce the same,
optimized machine assembly code that it has before. It is entirely your
choice to compile towards one or the other.

Cheerio!
 
Does it compile to the same as VB by default, and if so
what sets this option? Or is it just decided by what code
you write?
 
Ben said:
Does it compile to the same as VB by default, and if so
what sets this option? Or is it just decided by what code
you write?

If you compile with the /clr complier option, it compiles to IL. If you
compile without /clr, it compiles to x86 machine language.

-cd
 
Back
Top