versions

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

    #1

    versions


    Hi,

    There are many versions of C and C++ built by many differen
    companies.
    So, which version :

    1. more easier to learn
    2. more easier to remember
    3. more easier to debug
    4. helps me find errors fast and professionally
    5. more portable
    6. has the biggest community
    7. has more tutorials widely available
    8. has it’s source code all over the internet
    9. and so on

    If C++ is an extension of C then why isn’t it called the new version o
    C instead of having a different name ?
    And, why isn’t it called C+ instead of C++ ?
    Was there ever a C+ ?
    Who created the C++ and why couldn’t they give a different name instea
    of copying the name from C ?
    Anything else I should know


    -
    onau
    -----------------------------------------------------------------------
    Posted via http://www.codecomments.co
    -----------------------------------------------------------------------

  • Ulrich Eckhardt

    #2
    Re: versions

    onauc wrote:[color=blue]
    > There are many versions of C and C++ built by many different
    > companies.[/color]

    Hrrm, not versions, but implementations thereof. The point is, that (I'll
    leave aside C++ for now) you have basically two standards currently in
    use, C89 and C99 IIRC. There is also the ancient K&R C(named by C's
    originators Kernighan and Ritchie) which was AFAIK never standardized, but
    that is not in wide use anymore.

    Most compilers today conform to the C89 standard(i.e. are implementations
    of that standard), and that is also what you should start off learning
    first. Compilers is what exists many of, not versions of C or C++.

    If your question is how to start, I'd suggest reading
    news:alt.comp.l ang.learn.c-c++. Further, get a compiler with an
    IDE(kdevelop and DevC++ are both free) and a good book(read the reviews at
    accu.org).
    [color=blue]
    > If C++ is an extension of C then why isn’t it called the new version of
    > C instead of having a different name ?[/color]

    C and C++ share common roots, but C++ is not an extension of C. Both
    languages also differ in the way that you approach problems in them. Let
    me repeat: although their code uses the same syntax in most places, they
    are different languages, learn only one at a time!
    [color=blue]
    > Who created the C++ and why couldn’t they give a different name instead
    > of copying the name from C ?[/color]

    Bjarne Stroustrup is its originator, plus many others that helped
    standardize C++. You can find some background info on his homepage.

    Uli

    Comment

    • Malcolm

      #3
      Re: versions


      "onauc" <onauc.1g0klm@m ail.codecomment s.com> wrote[color=blue]
      >
      > There are many versions of C and C++ built by many different
      > companies.
      > So, which version :
      >
      > 1. more easier to learn
      > 2. more easier to remember
      > 3. more easier to debug
      > 4. helps me find errors fast and professionally
      > 5. more portable
      > 6. has the biggest community
      > 7. has more tutorials widely available
      > 8. has it's source code all over the internet
      > 9. and so on
      >[/color]
      With C, there is a distinction between the language proper, the standard
      library, and the platform-specific libraries that ship with most compilers.
      With a few minor variations, the language proper is stable, and is the same
      whichever compiler you buy. The standard library is also, as the name
      implies, the same. You need to learn both of these to be a C programmer.

      Platform-specific libraries tend to be very large, and few programmers know
      all the details of any one library. I have my opinions on which libraries
      are well-designed and which are a pig in a poke, but I will keep them to
      myself.

      An IDE (integrated development environment) also comes with most commercial
      compilers. This shouldn't be confused with the compiler proper, which takes
      in an ASCII source file, written in any editor, and spits out an executable,
      running entirely without any graphical output. IDEs generally come with
      debuggers, online documentation, source control systems, maybe tools like
      memory leak detectors.

      Which IDE you use depends on which platform you run, and how much money you
      have to spend. Microsoft .net is probably the most widely-used on PCs, and
      for professional development is effectively essential, because of the way
      Microsoft have managed to tie the operating system and third party products
      into their compiler. However if you can get another compiler much cheaper it
      will probably be perfectly adequate for home use.
      [color=blue]
      > If C++ is an extension of C then why isn't it called the new version of
      > C instead of having a different name ?
      >[/color]
      Because the C subset remains a language which people use, for various
      reasons it is often better to reject the C++ extensions.[color=blue]
      >
      > And, why isn't it called C+ instead of C++ ?
      >[/color]
      The name is a cute bit of marketing. in C, "C++" means "increment C".[color=blue]
      >
      > Was there ever a C+ ?
      >[/color]
      Not that I know of.[color=blue]
      >
      > Who created the C++ and why couldn't they give a different name instead
      > of copying the name from C ?
      >[/color]
      The name is a little bit unfair to C programmers, since it implies that we
      are using an inferior language. I actually failed a job interview once
      because of this. I said I preferred C, and the interviewer, who obviously
      wasn't very adept technically, seemed tog et the impression that this was
      because I was incapable of understanding C++.
      The name C++ implies "a better C". Since both languages are open standards
      there is no-one around to hire lawyers, so Bjarne Stroustrup, who invented
      C++, was allowed to get away with it.[color=blue]
      >
      > Anything else I should know ?
      >[/color]
      From the questions you ask you are obviously at a very early stage of
      learning about C programming. For the purpose of the newsgroup, the most
      important thing to be claer about is the distinction the langauge proper and
      the standard library, both of which are on-topic, and work the same way on
      all platforms, and the tools and extensions, which we don't deal with here.


      Comment

      • pete

        #4
        Re: versions

        onauc wrote:
        [color=blue]
        > If C++ is an extension of C then why isn’t
        > it called the new version of
        > C instead of having a different name ?
        > And, why isn’t it called C+ instead of C++ ?
        > Was there ever a C+ ?
        > Who created the C++ and why couldn’t they give a different name
        > instead of copying the name from C ?
        > Anything else I should know ?[/color]

        You should know how to use google.
        Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.


        --
        pete

        Comment

        • Arthur J. O'Dwyer

          #5
          Re: versions


          On Sat, 20 Nov 2004, Malcolm wrote:[color=blue]
          >
          > Which IDE you use depends on which platform you run, and how much money you
          > have to spend. Microsoft .net is probably the most widely-used on PCs, and
          > for professional development is effectively essential,[/color]

          .NET might be the most widely used in some fields, and I'd agree that
          the Microsoft Visual Whatever family is probably the most widely used on
          PCs in the commercial world, but I think you give .NET too much credit. :)
          [color=blue]
          > because of the way
          > Microsoft have managed to tie the operating system and third party products
          > into their compiler. However if you can get another compiler much cheaper it
          > will probably be perfectly adequate for home use.[/color]

          Yep. GCC is free. I use it on three platforms (DJGPP on WinXP, and the
          compilers that come with the system on Red Hat and Solaris), and it's
          very nice that it works the same on all three.

          [...][color=blue][color=green]
          >> And, why isn't it called C+ instead of C++ ?
          >>[/color]
          > The name is a cute bit of marketing. in C, "C++" means "increment C".[/color]
          [...][color=blue]
          > The name is a little bit unfair to C programmers, since it implies that we
          > are using an inferior language. [...] The name C++ implies "a better C".[/color]

          Well, as anyone who's learned C++ after C knows, the name "C++" actually
          means "increment C, and then use the old value." ;-)
          [color=blue]
          > From the questions you ask you are obviously at a very early stage of
          > learning about C programming. For the purpose of the newsgroup, the most
          > important thing to be clear about is the distinction the language proper
          > and the standard library, both of which are on-topic, and work the same
          > way on all platforms, and the tools and extensions, which we don't deal
          > with here.[/color]

          Yup.

          -Arthur

          Comment

          • dandelion

            #6
            Re: versions


            "onauc" <onauc.1g0klm@m ail.codecomment s.com> wrote in message
            news:1100936214 .p5PHKmDD1b+rgR sS19cEtg@tng...[color=blue]
            >
            > Hi,
            >
            > There are many versions of C and C++ built by many different
            > companies.
            > So, which version :
            >
            > 1. more easier to learn[/color]

            If you are going to choose a compiler, standard conformity is an important
            issue. Various vendors may add 'features' to the standard, but is is usually
            wise to be *very* carefull about using them. It implies you're stuck with
            that vendor as long as you're using that speicific feature. I've been there
            and it's no place i'd recommend.

            Hence, this is not really an issue.
            [color=blue]
            > 2. more easier to remember[/color]

            idem.
            [color=blue]
            > 3. more easier to debug[/color]

            Depends on the quality of the debugger, not the compiler. If yoiu are going
            to buy a IDE, this *may* be an issue.
            [color=blue]
            > 4. helps me find errors fast and professionally[/color]

            That mainly depends on wether or not you write your code professionally.
            [color=blue]
            > 5. more portable[/color]

            Standard conforming....
            [color=blue]
            > 6. has the biggest community[/color]

            C below.
            [color=blue]
            > 7. has more tutorials widely available[/color]

            C is C is C... If your compiler is standard conforming, you can use any
            tutorial.
            [color=blue]
            > 8. has it's source code all over the internet[/color]

            idem. If you mean "compiler sources" check out http://gcc.gnu.org.
            [color=blue]
            > 9. and so on[/color]

            You forget the most important question with respect to quality. "Is the code
            generation
            any good?" after all, that is the *real* product of a compiler. All others
            are secondary.
            [color=blue]
            > If C++ is an extension of C then why isn't it called the new version of
            > C instead of having a different name ?[/color]

            Neither. It's another language with it's own (large) set of pro's and con's.
            Do not confuse the two, eventhough they share a lot.
            [color=blue]
            > And, why isn't it called C+ instead of C++ ?[/color]

            Other posters have answered this.
            [color=blue]
            > Was there ever a C+ ?[/color]

            Nope. C below, however.
            [color=blue]
            > Who created the C++ and why couldn't they give a different name instead
            > of copying the name from C ?[/color]

            C++ started out as a C-preprocessor called CPlus (IIRC). so the link between
            C and C++ is an old one and (personally) I have never taken any offence. I
            would be rather surprized if eithe Mr. Kernigan or Mr Ritchie have.
            [color=blue]
            > Anything else I should know ?[/color]

            Yes. Lots. But that goes for me, too.

            Basically, this is my short list of important questions:

            a. How good is the code generation?
            b. Is it standard conforming (C98 *or* C99)?
            c. How good are the diagnostics (errors, warnings)?
            d. How many platforms are supported and are the features
            of that platform supported well or summarily?
            e. How well is the compiler documented?
            f. How quickly are bugs found and fixed?

            where a & b have top priority. Question d is a tricky one, but should not be
            neglected. If (for instance) you compile for a PowerPC and the compiler does
            not optimize (instruction scheduling, branch prediction, register
            allocation) for the processors ability to do 3 floating-point and one
            integer operation simultaneously, it is a good as worthless for that
            processor, no matter how good it may be for other processors.

            Choosing a compiler is no easy task.


            Comment

            • Dan Pop

              #7
              Re: versions

              In <1100936214.p5P HKmDD1b+rgRsS19 cEtg@tng> onauc <onauc.1g0klm@m ail.codecomment s.com> writes:
              [color=blue]
              >So, which version :
              >
              >1. more easier to learn[/color]

              C89.
              [color=blue]
              >2. more easier to remember[/color]

              C89.
              [color=blue]
              >3. more easier to debug[/color]

              Not a language issue. Debugability is a code property, not a language
              property.
              [color=blue]
              >4. helps me find errors fast and professionally[/color]

              What's the difference between debugging and finding errors?
              [color=blue]
              >5. more portable[/color]

              C89.
              [color=blue]
              >6. has the biggest community[/color]

              C89.
              [color=blue]
              >7. has more tutorials widely available[/color]

              C89.
              [color=blue]
              >8. has it’s source code all over the internet[/color]

              A language specification has no source code. You can find the source
              code of conforming C89 *implementation s* on the Internet.
              [color=blue]
              >9. and so on[/color]

              C89.
              [color=blue]
              >If C++ is an extension of C then why isn’t it called the new version of
              >C instead of having a different name ?[/color]

              Because it's not an extension of C.
              [color=blue]
              >And, why isn’t it called C+ instead of C++ ?[/color]

              Are you sure you have the slightest clue about C?
              [color=blue]
              >Was there ever a C+ ?[/color]

              Not that I know of.
              [color=blue]
              >Who created the C++[/color]

              Bjarne Stroustrup.
              [color=blue]
              >and why couldn’t they give a different name instead
              >of copying the name from C ?[/color]

              C++ started as an attempt to improve C. By the time it became something
              quite different its name was far too popular to be changed. And,
              considering that most of C is part of the common subset of the two
              languages, the name is still, at least partly, justified.
              [color=blue]
              >Anything else I should know ?[/color]

              Most of your questions are utterly irrelevant.

              Anything you should know is included in K&R2. Go and read it.

              Dan
              --
              Dan Pop
              DESY Zeuthen, RZ group
              Email: Dan.Pop@ifh.de
              Currently looking for a job in the European Union

              Comment

              • Keith Thompson

                #8
                Re: versions

                Dan.Pop@cern.ch (Dan Pop) writes:
                [...][color=blue][color=green]
                >>and why couldn't they give a different name instead
                >>of copying the name from C ?[/color]
                >
                > C++ started as an attempt to improve C. By the time it became something
                > quite different its name was far too popular to be changed. And,
                > considering that most of C is part of the common subset of the two
                > languages, the name is still, at least partly, justified.[/color]

                Early versions of the language that became C++ were referred to as
                "C with classes" (which doesn't contradict your point).

                --
                Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
                We must do something. This is something. Therefore, we must do this.

                Comment

                Working...