C# vs. C++

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

    #31
    Re: C# vs. C++

    RFOG wrote:
    En 21/06/2008 06:39:43, MC <for.address.lo ok@www.ai.uga.e du.slash.mc>
    escribió:
    [...]
    >
    And actually it is impssible to buid an OS in Java or in a .NET languge.
    What about Singularity and Cosmos ?
    >
    [...]
    Andre

    Comment

    • Daniel Boulerice

      #32
      Re: C# vs. C++

      Thanks for the reply. I'll check into it.
      "MC" <for.address.lo ok@www.ai.uga.e du.slash.mcwrot e in message news:OCaaRe90IH A.2384@TK2MSFTN GP04.phx.gbl...
      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.
      Intermediate code is not interpreted, it is JIT-compiled. It can also be precompiled if you wish.

      There is a reason we want to be shielded from machine internals just a bit -- Not all of the computers of the future are going to be 32-bit Pentiums! That is the rationale for using intermediate code and JIT compilation.


      Comment

      • Daniel Boulerice

        #33
        Re: C# vs. C++

        Thanks for the reply. I'll check into it.

        "Arne Vajhøj" <arne@vajhoej.d kwrote in message
        news:485d63f7$0 $90268$14726298 @news.sunsite.d k...
        Daniel Boulerice wrote:
        > * 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.
        >
        Try google "JIT compiler".
        >
        Arne

        Comment

        • Daniel Boulerice

          #34
          Re: C# vs. C++

          Thanks for the reply. I'll check into it.

          "Rudy Velthuis" <newsgroups@rve lthuis.dewrote in message
          news:xn0frpabf0 00000i@news.mic rosoft.com...
          Daniel Boulerice wrote:
          >
          >>
          >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.
          >
          No, it isn't. At runtime, it is compiled just-in-time and it runs
          natively, it is not interpreted. The CLR is not another program either,
          it is the main runtime library that comes with .NET, and also runs
          natively. AFAIK, most C++ products also have a runtime library. .NET's
          CLR is just more extensive.
          --
          Rudy Velthuis http://rvelthuis.de
          >
          "This book fills a much-needed gap."
          -- Moses Hadas (1900-1966) in a review

          Comment

          • Michael D. Ober

            #35
            Re: C# vs. C++

            "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

            • Giovanni Dicanio

              #36
              Re: C# vs. C++


              "Andre Kaufmann" <andre.kaufmann _re_move_@t-online.deha scritto nel
              messaggio news:eAV3DLI1IH A.2208@TK2MSFTN GP04.phx.gbl...
              RFOG wrote:
              >En 21/06/2008 06:39:43, MC <for.address.lo ok@www.ai.uga.e du.slash.mc>
              >escribió:
              >[...]
              >>
              >And actually it is impssible to buid an OS in Java or in a .NET languge.
              >
              What about Singularity and Cosmos ?
              I think that those are *experimental* stuff, not commercial OSes, available
              in shops to buy.

              The "real" things (Windows, GNU/Linux, Mac OS X OSes) are written in C
              and/or C++.

              Giovanni


              Comment

              • Rudy Velthuis

                #37
                Re: C# vs. C++

                Giovanni Dicanio wrote:
                >
                "Andre Kaufmann" <andre.kaufmann _re_move_@t-online.deha scritto nel
                messaggio news:eAV3DLI1IH A.2208@TK2MSFTN GP04.phx.gbl...
                RFOG wrote:
                >En 21/06/2008 06:39:43, MC
                <for.address.lo ok@www.ai.uga.e du.slash.mc escribió:
                [...]
                >
                And actually it is impssible to buid an OS in Java or in a .NET
                languge.
                What about Singularity and Cosmos ?
                >
                I think that those are experimental stuff, not commercial OSes,
                available in shops to buy.
                But it is possible, and it could well be that it is done, also
                commercially, one day.

                --
                Rudy Velthuis http://rvelthuis.de

                "The artist is nothing without the gift, but the gift is nothing
                without work." -- Emile Zola (1840-1902)

                Comment

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

                  #38
                  Re: C# vs. C++

                  Rudy Velthuis wrote:
                  Giovanni Dicanio wrote:
                  >"Andre Kaufmann" <andre.kaufmann _re_move_@t-online.deha scritto nel
                  >messaggio news:eAV3DLI1IH A.2208@TK2MSFTN GP04.phx.gbl...
                  >>RFOG wrote:
                  >>>En 21/06/2008 06:39:43, MC
                  ><for.address.l ook@www.ai.uga. edu.slash.mc escribió:
                  >>>[...]
                  >>>>
                  >>>And actually it is impssible to buid an OS in Java or in a .NET
                  >>>languge.
                  >>What about Singularity and Cosmos ?
                  >I think that those are experimental stuff, not commercial OSes,
                  >available in shops to buy.
                  >
                  But it is possible, and it could well be that it is done, also
                  commercially, one day.
                  It could. And I am sure it will.

                  But new mainstream OS's are rather rare. I think the newest
                  must be Linux from 1991.

                  It may take some time before the next one shows up.

                  Arne

                  Comment

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

                    #39
                    Re: C# vs. C++

                    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 ...

                    Arne

                    Comment

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

                      #40
                      Re: C# vs. C++

                      Cholo Lennon wrote:
                      "Arne Vajhøj" <arne@vajhoej.d kescribió en el mensaje
                      news:485d64a7$0 $90268$14726298 @news.sunsite.d k...
                      >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.

                      TR1 is fine, but strictly speaking it is not C++ yet (it may
                      be in 2009 rumors say).

                      Arne

                      Comment

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

                        #41
                        Re: C# vs. C++

                        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

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

                          #42
                          Re: C# vs. C++

                          Alvin Bruney [ASP.NET MVP] wrote:
                          >C# can also give you some of that, but C++ is more
                          >flexible and powerful,
                          Why is it more powerful and more flexible? I thought you could write
                          'unsafe' code in C#. Doesn't that make it as powerful and as flexible.
                          Or perhaps unsafe code was removed from C#, if so then I stand corrected.
                          It is still there.

                          But the trouble interacting between unsafe and safe code
                          makes it not very attractive in my eyes. If I had a need
                          for that type of code, then I would do it in C++.

                          Arne

                          Comment

                          • Andre Kaufmann

                            #43
                            Re: C# vs. C++

                            Arne Vajhøj wrote:
                            Rudy Velthuis wrote:
                            [...]
                            It could. And I am sure it will.
                            But new mainstream OS's are rather rare. I think the newest
                            must be Linux from 1991.
                            I would call Linux from 1991 experimental too. At least I remember it to
                            be a huge experiment to get it up and started ;-).
                            [...]
                            Arne

                            Comment

                            • Hendrik Schober

                              #44
                              Re: C# vs. C++

                              Daniel James <wastebasket@no spam.aaisp.orgw rote:
                              In article news:<#UIXFLA1I HA.1772@TK2MSFT NGP03.phx.gbl>, Hendrik
                              Schober wrote:
                              >IMO these to paragraphs contradict each other. C makes it a lot
                              >easier to write bad, crashing code, than C++ does.
                              >
                              No, if you really /want/ bad, crashing, code you can write it just as
                              easily in C++ as in C (it might be a bit harder in C#, but you can
                              still do it).
                              I wasn't talking about Macchiavelli.
                              ("C++ tries to guard against Murphy, not Machiavelli.")
                              [...]
                              Daniel.
                              Schobi

                              --
                              SpamTrap@gmx.de is never read
                              I'm HSchober at gmx dot de
                              "I guess at some point idealism meets human nature and
                              explodes." Daniel Orner


                              Comment

                              • Daniel James

                                #45
                                Re: C# vs. C++

                                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

                                Working...