C# vs. C++

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

    #46
    Re: C# vs. C++

    In article news:<485ee160$ 0$90264$1472629 8@news.sunsite. dk>, Arne
    Vajhøj wrote:
    But new mainstream OS's are rather rare. I think the newest
    must be Linux from 1991.
    Symbian OS is newer -- first released (as EPOC32) in 1997.

    It is written in C++, albeit using a rather odd dialect (forced upon it
    in part by the quality of the GNU cross-compilation toolchain for ARM
    at the time it was written, and partly by certain in-house coding
    styles at Psion).

    Cheers,
    Daniel.


    Comment

    • Daniel James

      #47
      Re: C# vs. C++

      In article news:<485eef0c$ 0$90272$1472629 8@news.sunsite. dk>, Arne
      Vajhøj wrote:
      If you teach C++ to 50 students, then you may get 10 great
      programmers and 40 that swear never to try and program again.
      I'd call that a positive result! Certainly better than getting 50
      mediocre programmers.

      Cheers,
      Daniel.


      Comment

      • Daniel James

        #48
        Re: C# vs. C++

        In article news:<Lo-dneHtSdxF68HVnZ 2dnUVZ_tXinZ2d@ earthlink.com>,
        Michael D. Ober wrote:
        Huh? Our entire telecommunicati ons industry is written in C and C++
        and C++ is still the way to go for embedded systems.
        Not quite ... Ericsson's telephone exchange software is written in
        Haskell, for example. They claim that it could not be written to run so
        efficiently in C or C++.

        Cheers,
        Daniel.


        Comment

        • Cholo Lennon

          #49
          Re: C# vs. C++

          Arne Vajhøj wrote:
          Cholo Lennon wrote:
          >"Arne Vajhøj" <arne@vajhoej.d kescribió en el mensaje
          >news:485d64a7$ 0$90268$1472629 8@news.sunsite. dk...
          >>Nick wrote:
          >>>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
          >>More access levels, interfaces and delegates seems
          >>to me to be features that makes good OOP easier.
          >>
          >Just some clarification: In C++ you have interfaces (abstract
          >classes) and delegates (std::tr1::func tion or boost::function )
          >
          C# also has abstract classes and even though abstract classes can
          be used instead of interfaces, then interfaces especially when
          combined with the only inherit from one class but implement
          multiple interfaces rules really guide users towards good
          OOP style.
          It's a point of view...
          >
          TR1 is fine, but strictly speaking it is not C++ yet (it may
          be in 2009 rumors say).
          >
          Well, some compilers are distributing partial tr1 implementations and function
          is included. BTW boost::function (in which std::tr1::funct ion is based) has many
          years and is widely used in modern C++ code / production code.


          Regards

          --
          Cholo Lennon
          Bs.As.
          ARG



          Comment

          • Hendrik Schober

            #50
            Re: C# vs. C++

            Arne Vajhøj wrote:
            Hendrik Schober wrote:
            >MC <for.address.lo ok@www.ai.uga.e du.slash.mcwrot e:
            >>[...]
            >>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.
            >>>
            >>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. [...]
            >>
            > IMO these to paragraphs contradict each other. C makes it a lot
            > easier to write bad, crashing code, than C++ does.
            >
            Since C++ support practically all of C then ...
            ...if C++ wouldn't do so much to make it easy to write
            better, safer code, my above statement wouldn't make
            sense. Yes. Your point?
            Arne
            Schobi

            Comment

            • cj

              #51
              Re: C# vs. C++

              Geesh, I sure got a lot of posts on that one. I'm not sure where I'm
              headed but I appreciate the opinions.


              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.

              Comment

              • Adhal

                #52
                Re: C# vs. C++

                cj wrote:
                Geesh, I sure got a lot of posts on that one. I'm not sure where I'm
                headed but I appreciate the opinions.
                >
                lol Is become a C++ forum. Nice thread.

                Learn a bit of C++ first, even just the basics you will appreciated C# more. Don't go into depth
                just basics.

                I knew a bit of C and C++ and currently learning C#. I love C# because it reminds me of C and has
                encouraged me to learn C++. Once I am more confident in C# I will begin to dig in C++.

                Also note all games are written in C & C++. Well most mainstream commercial games. C++ is not going
                to die out within our lifetime.

                Those who say is dying are talking rubbish and hype. C++ programmers will die out long before C++.
                That is the most likely outcome, and watch salaries soar.


                --
                Adhal Freeware

                Comment

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

                  #53
                  Re: C# vs. C++

                  Hendrik Schober wrote:
                  Arne Vajhøj wrote:
                  >Hendrik Schober wrote:
                  >>MC <for.address.lo ok@www.ai.uga.e du.slash.mcwrot e:
                  >>>[...]
                  >>>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.
                  >>>>
                  >>>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. [...]
                  >>>
                  >> IMO these to paragraphs contradict each other. C makes it a lot
                  >> easier to write bad, crashing code, than C++ does.
                  >>
                  >Since C++ support practically all of C then ...
                  >
                  ...if C++ wouldn't do so much to make it easy to write
                  better, safer code, my above statement wouldn't make
                  sense. Yes. Your point?
                  Should be obvious.

                  Arne

                  Comment

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

                    #54
                    Re: C# vs. C++

                    Cholo Lennon wrote:
                    Arne Vajhøj wrote:
                    >Cholo Lennon wrote:
                    >>"Arne Vajhøj" <arne@vajhoej.d kescribió en el mensaje
                    >>news:485d64a7 $0$90268$147262 98@news.sunsite .dk...
                    >>>Nick wrote:
                    >>>>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
                    >>>More access levels, interfaces and delegates seems
                    >>>to me to be features that makes good OOP easier.
                    >>Just some clarification: In C++ you have interfaces (abstract
                    >>classes) and delegates (std::tr1::func tion or boost::function )
                    >C# also has abstract classes and even though abstract classes can
                    >be used instead of interfaces, then interfaces especially when
                    >combined with the only inherit from one class but implement
                    >multiple interfaces rules really guide users towards good
                    >OOP style.
                    >
                    It's a point of view...
                    >
                    >TR1 is fine, but strictly speaking it is not C++ yet (it may
                    >be in 2009 rumors say).
                    >
                    Well, some compilers are distributing partial tr1 implementations and function
                    is included. BTW boost::function (in which std::tr1::funct ion is based) has many
                    years and is widely used in modern C++ code / production code.
                    boost != C++

                    But on the other side:
                    - very few are using only ANSI features
                    - boost is widely used
                    - the C++ standardization process is let us call it thorough
                    so maybe it is a more fair comparison to include boost in C++
                    functionality.

                    Arne

                    Comment

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

                      #55
                      Re: C# vs. C++

                      Daniel James wrote:
                      In article news:<485eef0c$ 0$90272$1472629 8@news.sunsite. dk>, Arne
                      Vajhøj wrote:
                      >If you teach C++ to 50 students, then you may get 10 great
                      >programmers and 40 that swear never to try and program again.
                      >
                      I'd call that a positive result! Certainly better than getting 50
                      mediocre programmers.
                      Seen from a puristic point of view I will agree. But there
                      is this aspect of the world called money - we need millions
                      of programmers to code business apps.

                      Arne

                      Comment

                      • Alvin Bruney [ASP.NET MVP]

                        #56
                        Re: C# vs. C++

                        Don't confuse flexibility with lack of safety -- you can have the one
                        without the other.
                        How is this confused? My point was C# is not less flexible because it allows
                        pointer tricks, something that C++ claims as an advantage, safety or lack of
                        it has nothing to do with the argument. At the end of the day, you have the
                        best of both worlds in C#.
                        The single most glaringly obvious example of what I mean is that you
                        can't do template metaprogramming in C#, but there are others.
                        And what is that good for? I wouldn't go searching for obscure features to
                        compare against C#. What I would do is compare common code paths and
                        implementation. Like it or not, C++ is a dying sport. Holding on to
                        obscurities will not inject life into it.
                        more strictly, to provide a plugin replacement for Java
                        That's new. By the same token C++ was what to C?

                        It's time to let go of C++. Really, it is. It's done for.

                        --

                        Regards,
                        Alvin Bruney [MVP ASP.NET]

                        [Shameless Author plug]
                        The O.W.C. Black Book, 2nd Edition
                        Exclusively on www.lulu.com/owc $19.99
                        -------------------------------------------------------


                        "Daniel James" <wastebasket@no spam.aaisp.orgw rote in message
                        news:VA.0000144 1.4776d57a@nosp am.aaisp.org...
                        In article news:<87D65B9A-4847-402A-B8BF-94D6314A2C7A@mi crosoft.com>,
                        Alvin Bruney [ASP.NET MVP] wrote:
                        >Why is it more powerful and more flexible? I thought you could write
                        >'unsafe' code in C#.
                        >
                        Don't confuse flexibility with lack of safety -- you can have the one
                        without the other.
                        >
                        Why is C++ more powerful than C#? Because you can do more things with
                        it, in more ways. C# is designed to support the "Object Oriented"
                        paradigm (or, more strictly, to provide a plugin replacement for Java
                        -- which is an almost religiously 'pure' OO language) but C++ is a
                        multi-paradigm language -- it can "do OOP", but it can be used to
                        implement other designs as well.
                        >
                        The single most glaringly obvious example of what I mean is that you
                        can't do template metaprogramming in C#, but there are others.
                        >
                        Cheers,
                        Daniel.
                        >
                        >
                        >
                        >

                        Comment

                        • Alvin Bruney [ASP.NET MVP]

                          #57
                          Re: C# vs. C++

                          What's replacing them for the real-time control portions of the code?
                          Real time control where? If you are talking at the switch level, that's C
                          code. Period. I'm not aware of any of the major telecom players who would
                          touch that code because it is business critical. You could interpret that as
                          C is superior. I'll interpret it as don't mess with it because it ain't
                          broke.

                          Anything north of the switch to include the billing platforms, call routing
                          on up to client reporting and statistics is not C and not C++.

                          I once wrote a C# proof of concept for a company just to show that C# could
                          outperform C for billing and summarization. It worked, hands down, because
                          C# has a better memory allocation model for memory intensive applications,
                          which billing and summarization is. However, nobody wanted me to implement
                          the concept in the real world because the existing application was 'mission
                          critical'. go figure. C at the real time portion of the code is not there
                          because it brings any major advantage over what we have today.

                          --

                          Regards,
                          Alvin Bruney [MVP ASP.NET]

                          [Shameless Author plug]
                          The O.W.C. Black Book, 2nd Edition
                          Exclusively on www.lulu.com/owc $19.99
                          -------------------------------------------------------


                          "Michael D. Ober" <obermd.@.alum. mit.edu.nospam. wrote in message
                          news:MLadnZvSnN EvHMPVnZ2dnUVZ_ i2dnZ2d@earthli nk.com...
                          "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot male spam filterwrote
                          in message news:EFB0949F-2E76-4B52-AF3A-DC9A709BB8FF@mi crosoft.com...
                          >>Huh? Our entire telecommunicati ons industry is written in C and C++
                          >>
                          >Sleight of hand. I worked for a few years in the telecommunicati ons
                          >industry. C and C++ happen to be entrenched there because at the time
                          >that was the dominant languages. As these pieces get re-written,
                          >rest-assured they won't be re-written in these languages because there's
                          >nothing to gain using these technologies in telecommunicati ons. I know,
                          >I've been there.
                          >>
                          >
                          What's replacing them for the real-time control portions of the code?
                          >
                          Mike.
                          >
                          >

                          Comment

                          • Alvin Bruney [ASP.NET MVP]

                            #58
                            Re: C# vs. C++

                            I agree 100%. I should have said earlier "if these pieces get re-written..."

                            --

                            Regards,
                            Alvin Bruney [MVP ASP.NET]

                            [Shameless Author plug]
                            The O.W.C. Black Book, 2nd Edition
                            Exclusively on www.lulu.com/owc $19.99
                            -------------------------------------------------------


                            "Arne Vajhøj" <arne@vajhoej.d kwrote in message
                            news:485eefe7$0 $90272$14726298 @news.sunsite.d k...
                            Alvin Bruney [ASP.NET MVP] wrote:
                            >>Huh? Our entire telecommunicati ons industry is written in C and C++
                            >>
                            >Sleight of hand. I worked for a few years in the telecommunicati ons
                            >industry. C and C++ happen to be entrenched there because at the time
                            >that was the dominant languages. As these pieces get re-written,
                            >rest-assured they won't be re-written in these languages because there's
                            >nothing to gain using these technologies in telecommunicati ons. I know,
                            >I've been there.
                            >
                            Applications rarely get rewritten. I would expect most of the existing
                            C and C++ apps to continue running for a decade or two more. Just
                            think of how many 30 year old Cobol and PL/I code that are still around.
                            >
                            New apps will likely be written in something else (Java or .NET) unless
                            there are special reasons not to (hardware interfaces or real time
                            requirements or requirement for very low memory footprint).
                            >
                            Arne

                            Comment

                            • =?UTF-8?B?QXJuZSBWYWpow7hq?=

                              #59
                              Re: C# vs. C++

                              Alvin Bruney [ASP.NET MVP] wrote:
                              >What's replacing them for the real-time control portions of the code?
                              Real time control where? If you are talking at the switch level, that's
                              C code. Period. I'm not aware of any of the major telecom players who
                              would touch that code because it is business critical. You could
                              interpret that as C is superior. I'll interpret it as don't mess with it
                              because it ain't broke.
                              Or the real time requirements and/or requirements for low
                              memory foot print does not lend itself to a C# solution.

                              [I don't know but I assume that a switch has relative
                              little memory]

                              Arne

                              Comment

                              • RFOG

                                #60
                                Re: C# vs. C++

                                Then, Alvin, next Windows will be done in C#?


                                "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot male spam filterwrote in
                                message news:101D0CAB-378E-4B1C-9F18-B2D243CEBF11@mi crosoft.com...
                                >Don't confuse flexibility with lack of safety -- you can have the one
                                >without the other.
                                >
                                How is this confused? My point was C# is not less flexible because it
                                allows pointer tricks, something that C++ claims as an advantage, safety
                                or lack of it has nothing to do with the argument. At the end of the day,
                                you have the best of both worlds in C#.
                                >
                                >The single most glaringly obvious example of what I mean is that you
                                >can't do template metaprogramming in C#, but there are others.
                                >
                                And what is that good for? I wouldn't go searching for obscure features to
                                compare against C#. What I would do is compare common code paths and
                                implementation. Like it or not, C++ is a dying sport. Holding on to
                                obscurities will not inject life into it.
                                >
                                >more strictly, to provide a plugin replacement for Java
                                That's new. By the same token C++ was what to C?
                                >
                                It's time to let go of C++. Really, it is. It's done for.
                                >
                                --
                                >
                                Regards,
                                Alvin Bruney [MVP ASP.NET]
                                >
                                [Shameless Author plug]
                                The O.W.C. Black Book, 2nd Edition
                                Exclusively on www.lulu.com/owc $19.99
                                -------------------------------------------------------
                                >
                                >
                                "Daniel James" <wastebasket@no spam.aaisp.orgw rote in message
                                news:VA.0000144 1.4776d57a@nosp am.aaisp.org...
                                >In article news:<87D65B9A-4847-402A-B8BF-94D6314A2C7A@mi crosoft.com>,
                                >Alvin Bruney [ASP.NET MVP] wrote:
                                >>Why is it more powerful and more flexible? I thought you could write
                                >>'unsafe' code in C#.
                                >>
                                >Don't confuse flexibility with lack of safety -- you can have the one
                                >without the other.
                                >>
                                >Why is C++ more powerful than C#? Because you can do more things with
                                >it, in more ways. C# is designed to support the "Object Oriented"
                                >paradigm (or, more strictly, to provide a plugin replacement for Java
                                >-- which is an almost religiously 'pure' OO language) but C++ is a
                                >multi-paradigm language -- it can "do OOP", but it can be used to
                                >implement other designs as well.
                                >>
                                >The single most glaringly obvious example of what I mean is that you
                                >can't do template metaprogramming in C#, but there are others.
                                >>
                                >Cheers,
                                >Daniel.
                                >>
                                >>
                                >>
                                >>
                                --
                                Microsoft Visual C++ MVP
                                =============== =========
                                Mi blog sobre programación: http://geeks.ms/blogs/rfog
                                Momentos Leves: http://momentosleves.blogspot.com/
                                Cosas mías: http://rfog.blogsome.com/
                                Libros, ciencia ficción y programación
                                =============== =============== ==========
                                Una palabra mal colocada estropea el más bello pensamiento.
                                -- Francois Marie Arouet.

                                Comment

                                Working...