C# vs. C++

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

    C# vs. C++

    I don't want to start a war but why would I choose one over the other?
    First and foremost I need to keep in mind marketability of the skill and
    the future of the language.

    I'm getting the feeling I'll be moving from VB to one or the other. I
    have some say on which but perhaps not the final decision. I have used
    C and C++ a little bit years ago. I have no experience in C#. I don't
    expect it to be that difficult but I hate remembering the idiosyncrasies
    of too many languages so I'd like to pick one C# or C++ and make the
    right choice.
  • cfps.Christian

    #2
    Re: C# vs. C++

    Since you're moving from VB I'd say your best bet is C#. C# is very
    good for handling the forms while giving the feeling of power like C+
    +. Also if you're at a business C++ programmers are getting hard to
    find and thus getting expensive.

    Comment

    • Alcides

      #3
      Re: C# vs. C++

      IMHO if you can choose, then choose C#. Easier to master than C++, and
      hides all the pointer management you have in c++. Unless you have some
      strong requirement for C++, to me it is C#.

      Al.
      http://alsql.blogspot.com.

      Comment

      • Angus

        #4
        Re: C# vs. C++

        There is no correct answer. It depends on what you want to do. If you are
        writing business applications (ie standard data processing) then I imagine
        C# will be easier for you to learn if you are coming from VB. I use C++ and
        can tell you it is a steep learning curve. In my case, however, I am glad I
        put myself through it.

        "cj" <cj@nospam.nosp amwrote in message
        news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
        I don't want to start a war but why would I choose one over the other?
        First and foremost I need to keep in mind marketability of the skill and
        the future of the language.
        >
        I'm getting the feeling I'll be moving from VB to one or the other. I
        have some say on which but perhaps not the final decision. I have used
        C and C++ a little bit years ago. I have no experience in C#. I don't
        expect it to be that difficult but I hate remembering the idiosyncrasies
        of too many languages so I'd like to pick one C# or C++ and make the
        right choice.

        Comment

        • =?ISO-8859-1?Q?Fernando_G=F3mez?=

          #5
          Re: C# vs. C++

          Angus wrote:
          In my case, however, I am glad I
          put myself through it.
          >
          Amen brother :)

          Comment

          • PvdG42

            #6
            Re: C# vs. C++

            "cj" <cj@nospam.nosp amwrote in message
            news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
            I don't want to start a war but why would I choose one over the other?
            First and foremost I need to keep in mind marketability of the skill and
            the future of the language.
            >
            I'm getting the feeling I'll be moving from VB to one or the other. I
            have some say on which but perhaps not the final decision. I have used C
            and C++ a little bit years ago. I have no experience in C#. I don't
            expect it to be that difficult but I hate remembering the idiosyncrasies
            of too many languages so I'd like to pick one C# or C++ and make the right
            choice.
            Either might be an excellent choice, depending on what you want your market
            to be. C# is strictly .NET, while C++ can be used to develop for a multitude
            of environments. OTOH, if you will be developing strictly for .NET, C# would
            be the better choice because it's getting support for all the new .NET
            features.


            Comment

            • clintonG

              #7
              Re: C# vs. C++

              Microsoft developed C# specifically for the web. VB.NET was developed and
              remains being developed using C#.

              What motivated me to choose C# was the indisputable fact that web
              development is a client-server paradigm and as such separate language skills
              are needed for client-side and server-side development.

              JavaScript is the defacto standard for all client-side web development.
              Since JavaScript was derived from C both JavaScript and C# have exactly the
              same punctuation and nearly the same syntax and grammar making it possible
              to say we can learn two or more languages for the price of one so to speak.

              <%= Clinton Gallagher

              "cj" <cj@nospam.nosp amwrote in message
              news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
              >I don't want to start a war but why would I choose one over the other?
              >First and foremost I need to keep in mind marketability of the skill and
              >the future of the language.
              >
              I'm getting the feeling I'll be moving from VB to one or the other. I
              have some say on which but perhaps not the final decision. I have used C
              and C++ a little bit years ago. I have no experience in C#. I don't
              expect it to be that difficult but I hate remembering the idiosyncrasies
              of too many languages so I'd like to pick one C# or C++ and make the right
              choice.

              Comment

              • MC

                #8
                Re: C# vs. C++

                "cj" <cj@nospam.nosp amwrote in message news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
                >I don't want to start a war but why would I choose one over the other?
                First and foremost I need to keep in mind marketability of the skill and
                the future of the language.
                C++ is a dying language. It was an experimental object-oriented C-based language and has been superseded by Java and C#, which are the real thing. Even the inventor of C++ did not intend it to last very long, despite the great popularity that it achieved in the late 1990s.

                C# is very similar to Java. C# is almost confined to Windows and Java is portable.

                I would say, invest in C# if you want to develop mainly for Windows, or Java if you need complete portability, knowing that the two are very similar.

                Comment

                • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

                  #9
                  Re: C# vs. C++

                  cj wrote:
                  I don't want to start a war but why would I choose one over the other?
                  First and foremost I need to keep in mind marketability of the skill and
                  the future of the language.
                  >
                  I'm getting the feeling I'll be moving from VB to one or the other. I
                  have some say on which but perhaps not the final decision. I have used
                  C and C++ a little bit years ago. I have no experience in C#. I don't
                  expect it to be that difficult but I hate remembering the idiosyncrasies
                  of too many languages so I'd like to pick one C# or C++ and make the
                  right choice.
                  It depends a bit on the app.

                  First note that there are actually 3 choices: C#, C++ for .NET and
                  C++ for native.

                  But unless the code you want to write is special, then you should
                  got for C#. It is simply easier to do than C++.

                  That is also reflected in the job market where even though there are
                  plenty of C++ jobs, then C# has passed C++ in most markets and
                  seems headed to pass C++ in the rest of the markets soon.

                  Arne

                  Comment

                  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

                    #10
                    Re: C# vs. C++

                    clintonG wrote:
                    Microsoft developed C# specifically for the web.
                    I don't think so. I believe C# was developed to be a general
                    language.
                    JavaScript is the defacto standard for all client-side web development.
                    For the code part of it at least.
                    Since JavaScript was derived from C both JavaScript and C# have exactly
                    the same punctuation and nearly the same syntax and grammar making it
                    possible to say we can learn two or more languages for the price of one
                    so to speak.
                    C# and JavaScript both belongs to the C family of languages. But they
                    are somwhat different languages anyway.

                    Arne

                    Comment

                    • Michael D. Ober

                      #11
                      Re: C# vs. C++

                      "MC" <for.address.lo ok@www.ai.uga.e du.slash.mcwrot e in message
                      news:%2356u1pz0 IHA.1772@TK2MSF TNGP03.phx.gbl. ..
                      "cj" <cj@nospam.nosp amwrote in message
                      news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
                      >>I don't want to start a war but why would I choose one over the other?
                      >First and foremost I need to keep in mind marketability of the skill and
                      >the future of the language.
                      >
                      C++ is a dying language. It was an experimental object-oriented C-based
                      language and has been superseded by Java and C#, which are the real thing.
                      Even the inventor of C++ did not intend it to last very long, despite the
                      great popularity that it achieved in the late 1990s.
                      >
                      Huh? Our entire telecommunicati ons industry is written in C and C++ and C++
                      is still the way to go for embedded systems.
                      C# is very similar to Java. C# is almost confined to Windows and Java is
                      portable.
                      >
                      I would say, invest in C# if you want to develop mainly for Windows, or
                      Java if you need complete portability, knowing that the two are very
                      similar.
                      >
                      For general business programming, leverage your VB skills and learn VB.Net
                      (if your skills are VB 6) and C#. Once you learn either VB.net or C# the
                      other one is relatively easy. Both have their strong and weak points
                      relative to each other and knowing both will allow you to take advantage of
                      the better language for the solution you're working on.

                      Mike.


                      Comment

                      • Peter Duniho

                        #12
                        Re: C# vs. C++

                        On Fri, 20 Jun 2008 20:34:46 -0700, Michael D. Ober
                        <obermd.@.alum. mit.edu.nospam. wrote:
                        >C++ is a dying language. [...]
                        >
                        Huh? Our entire telecommunicati ons industry is written in C and C++ and
                        C++ is still the way to go for embedded systems.
                        I think he meant that "C++ is a dying language" in the same way that
                        FORTRAN and COBOL are "dying languages". Of course, those languages have
                        been dying for decades and still are in broad use. So C++ could take a
                        little while to finally kick the bucket too. :)

                        As far as embedded systems go, I think you will find that just as
                        C++ superceded assembly and hand-written machine code for embedded
                        systems, so too is C++ likely to be superceded by some other language.
                        For example, Java is already in widespread use as a platform language for
                        mobile phones, and it's not unreasonable to expect that inasmuch as
                        Windows is the OS for some embedded systems, C# and .NET will wind up
                        being commonly used in embedded systems as well.

                        Pete

                        Comment

                        • Nick

                          #13
                          Re: C# vs. C++

                          MC wrote:
                          >Dealing with existing C++ code can be a disaster when you have lots of
                          >inexperience d programmers on your team. To program well in C++ you have
                          >to learn disciplined modern C++ practices, such as reference counted
                          >smart pointers, RAII, exception safety, etc. Picking up a good style is
                          >impossible when you learn from old C++ books. Companies who hire C++
                          >programmers tend to have lots of legacy code that I wouldn't consider
                          >modern or easy to maintain.
                          >
                          That is a good point. Object-oriented programming wasn't mature when C++ came into use. There is a lot of bad C++ code in the world, and C++ makes it easy to write bad code and create programs that crash.
                          >
                          Curious. I wouldn't see C# as fundamentally better for writing
                          Object-oriented code. I see the two languages as essentially the same
                          but C# has removed the need for explicit memory management and a few
                          other house keeping issues (ok I know C# isn't quite as flexible and
                          full featured as C++). So C# is a bit like driving an automatic rather
                          than as stick shift. The really complicated thing is the driving not the
                          mundane task of changing gear.

                          I would chose C# as it is easier than C++ but more importantly you are
                          more likely to be given new code to write in C# rather than decipher
                          some arcane legacy system in C++.

                          I think C will outlive C++. C is going to continue to be a good language for small routines where performance is paramount. For such things, I find myself writing "C-barely-plus-plus," which is C with slight use of the C++ extensions. But when I want real object-oriented programming, I use C#.
                          I can't see why anyone would want to use C rather than C++?

                          Comment

                          • Giovanni Dicanio

                            #14
                            Re: C# vs. C++


                            "RFOG" <no@mail.comh a scritto nel messaggio
                            news:op.uc3f9es f2upo6d@red-mars-server...
                            I strongly disagree. Of course C++ is alive into embedded systems, but you
                            forget one thing: Java VM is done in C++, and if C++ disappears... Windows
                            will disappear because Windows is done in C and most in C++... Linux will
                            disappear too.
                            I agree with you, RFOG.

                            Only one point: Linux (the kernel) is built in pure C (not C++).

                            And actually it is impssible to buid an OS in Java or in a .NET languge.
                            .NET MicroFramework is the most low level C# and it is a layer over...
                            emmmm... rrrrr... ¡C++!
                            You're right.

                            Moreover, I doubt that very big and successfull apps (like Microsoft Office,
                            or Visual Studio, or even non-Microsoft apps like Photoshop) could be built
                            using C# (or Java...). Or, if they would be built with C# or some other
                            "managed" language, what would be the memory occupation and would they be as
                            snappy as the C++ versions?

                            Instead, for Internet stuff like ASP.NET, I think that C# (or VB.NET as
                            well) is a clear winner over C++.

                            Just use the right tool for the right job.

                            Giovanni


                            Comment

                            • Daniel Boulerice

                              #15
                              Re: C# vs. C++


                              CJ,

                              I guess you were surprised of how many replies you got so far!!

                              Anyway, if you want to move to C# or C++, know this:

                              a.. C# is a virtual machine - a little like java and VB already - at run-time your program is interpreted by another program called the CLR. It shields you from a lot of computer internals, but unlike VB, does a good job of offering you a nice object-oriented API. C# is just so cool for developers! The price to pay for this niceness is that programs are not as low-level as in C++, and thus will run a little slower.

                              b.. C++ on the contrary in just above C and assembler in terms of level. C++ will provide you with a rather direct access to the machine, a lot of efficiency, a lot of freedom. However, using that freedom and this more direct access to the OS, you will most probably hang yourself with the rope one day. It is much, much harder to harness all the power of C++, COM, Win32, etc., than it is to learn C# (as mentioned in another post). You can do programs that run faster, but you have less of a safety net when you decide to explore the untamed wilderness.

                              Wrapping up the above, C# is perfect for business applications that require more safety and faster development speed. I would say, in general, there way much more market for C#.

                              C++ is ideal if you want to do device drivers, develop system components, etc.

                              When it come to marketability, you have to assess your geographic situation. If you live in Silicon Valley, you probably need to develop in low-level and learn C++, or even master assembler. If you live in Montreal, the market is much higher level; C# is clearly adviseable. If you're unsure, refer to your local job web-site. Look up for what programer jobs are offered in your vicinity, and what they ask for in terms of knowledge and experience.

                              In any event, knowing how to manage a database is always - everywhere in the world - a wonderful though less glamourous asset.

                              Be good!


                              "cj" <cj@nospam.nosp amwrote in message news:uKLx1Px0IH A.6096@TK2MSFTN GP06.phx.gbl...
                              >I don't want to start a war but why would I choose one over the other?
                              First and foremost I need to keep in mind marketability of the skill and
                              the future of the language.

                              I'm getting the feeling I'll be moving from VB to one or the other. I
                              have some say on which but perhaps not the final decision. I have used
                              C and C++ a little bit years ago. I have no experience in C#. I don't
                              expect it to be that difficult but I hate remembering the idiosyncrasies
                              of too many languages so I'd like to pick one C# or C++ and make the
                              right choice.

                              Comment

                              Working...