Results 1 to 9 of 9

Thread: Why do most of you C++ programmers not jump onto C++ .net?

  1. #1

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    Why do most of you C++ programmers not jump onto C++ .net?

    Can C++ .net just as easily (or easier becuase of the environment) make completely unmanaged apps?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Visual C++ .NET can still make unmanaged C++ (i.e. normal) programs quite easily. In fact, unmanaged C++ is easier than managed
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    How could native C++ be easier than managed?

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You don't have to mess around with all the garbage collection, things like that.

    Then again I'm biased, because I'm used to all the features of C++, and the fact that I need to use them carefully...its a non-issue really.

    The only thing .NET could make slightly easier is making GUIs, threads, or network connections. All three are already handled in other C++ libraries, that are far more portable.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    What do you mean by the jump? I use Visual C++.Net 2003 as my programming environment, but I still program traditional C++ with it. Why? Because
    a) Managed C++ is mainly meant as a bridge from old code to .Net. Basically it is there to provide an easy way to make class libraries accessible from .Net languages. The core of the .Net framework is probably implemented in Hybrid C++.
    b) I learned C++ for it's purpose: to provide a very performant, flexible, portable and reusable programming language. Managed C++ must adhere to the CLS, so some features are not available, namely templates, the cool operator overloading syntax, multiple inheritance (ok, I can live without that) and some other things. The lack of templates truly is a problem. Also .Net is slower than native C++. For portability: there's no sign of the Mono project ever writing a Managed C++ compiler, so that code is bound to MS.
    c) .Net is awkward to use from Managed C++. A Java-equivalent of Managed C++ alone would be tricky, with everything being a pointer. Simply writing every variable as a pointer is tiresome. In true Managed C++ you must in addition distinguish between value types and class types (struct and class in C#), handle boxing etc. It's a mess.
    d) When I want to write for .Net I use C#. C# was developed for .Net and is extremly easy to use. Give me one good reason to prefer Managed C++ over C#.

    I could probably think of one or two more reasons, but I don't think they're necessary
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    IIRC, struct and class are equivalent in C++, apart from the default permissions.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But not in C#.

    C#:
    Code:
    struct S
    {
      public int i;
      public float f;
    }
    
    class C
    {
      public int i;
      public float f;
    }
    Managed C++:
    Code:
    __value struct/class S
    {
    public:
      int i;
      float f;
    };
    
    __gc struct/class C
    {
    public:
      int i;
      float f;
    };
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    I didn't know it was so different from C#. I'll stick with native C++ and C#. Thanks.

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    *slaps self*

    Yeah CB, you're right. I misread your paragraph.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width