Why use C++ .NET?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Walter

    #1

    Why use C++ .NET?

    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.
  • Bo Persson

    #2
    Re: Why use C++ .NET?


    "Walter" <backy1999@yaho o.com> skrev i meddelandet
    news:05bf01c34d d1$d08979c0$a40 1280a@phx.gbl.. .[color=blue]
    > 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.[/color]


    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
    bop2@telia.com

    Comment

    • Carl Daniel [VC++ MVP]

      #3
      Re: Why use C++ .NET?

      Walter wrote:[color=blue]
      > 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.[/color]

      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


      Comment

      • Lee Alexander

        #4
        Re: Why use C++ .NET?

        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" <backy1999@yaho o.com> wrote in message
        news:05bf01c34d d1$d08979c0$a40 1280a@phx.gbl.. .[color=blue]
        > 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.[/color]


        Comment

        • Brandon Bray [MSFT]

          #5
          Re: Why use C++ .NET?

          Walter wrote:[color=blue]
          > I am a C++ developer, and I've been playing around with
          > C++ .NET, which apparantly compiles to the same IL as VB!![/color]

          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!

          --
          Brandon Bray Visual C++ Compiler
          This posting is provided AS IS with no warranties, and confers no rights.


          Comment

          • Ben Taylor

            #6
            Re: Why use C++ .NET?

            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?

            [color=blue]
            >-----Original Message-----
            >Walter wrote:[color=green]
            >> I am a C++ developer, and I've been playing around with
            >> C++ .NET, which apparantly compiles to the same IL as[/color][/color]
            VB!![color=blue]
            >
            >Hi Walter,
            > I think everyone else has made a good case for[/color]
            advantages of using C++ for[color=blue]
            >..NET programming, but I do want to clarify one thing[/color]
            from your statement[color=blue]
            >above. The Visual C++ compiler (version 2002 and version[/color]
            2003) _can_ produce[color=blue]
            >the same IL as VB... it doesn't have to. It can still[/color]
            produce the same,[color=blue]
            >optimized machine assembly code that it has before. It is[/color]
            entirely your[color=blue]
            >choice to compile towards one or the other.
            >
            >Cheerio!
            >
            >--
            >Brandon Bray[/color]
            Visual C++ Compiler[color=blue]
            >This posting is provided AS IS with no warranties, and[/color]
            confers no rights.[color=blue]
            >
            >
            >.
            >[/color]

            Comment

            • Carl Daniel [VC++ MVP]

              #7
              Re: Why use C++ .NET?

              Ben Taylor wrote:[color=blue]
              > 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?[/color]

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

              -cd


              Comment

              Working...