Why is C++ so popular

Discussion in 'C++' started by Brian, Sep 27, 2012.

  1. Brian

    Brian Guest

    I have not found an answer to the question why C++ is the most preferred
    language. I thought it would be a good question to ask in this newsgroup
    that has programmers that have been using C++ for a while.
    I did read that its popular because it can be transferred to other
    platforms but not everyone has more than one platform.

    --
    Regards Brian
     
    Brian, Sep 27, 2012
    #1
    1. Advertising

  2. Brian

    Krice Guest

    On 27 syys, 11:44, Brian <> wrote:
    > I have not found an answer to the question why C++ is the most preferred
    > language.


    It's multi-paradigm which seems to be good in programming
    languages since one paradigm alone can be restricting. C++
    is mainly OOP language and I think OOP is the best paradigm
    we have at the moment.

    C++ has a good, clear syntax even it's "long" and some people
    think it requires too much writing. Still, some programming
    languages to me look like this: q:)+05,C-/(-Ae),"hello":r)
    which explains why they are not as preferred. C++ is quite
    easy to read if it's well written and don't have any fancy
    programming magic.

    C++ is also fast, a feature that can't be underestimated.
    Most programs work better if they have that extra speed
    coming from the simple low level structure of C++ executable.
     
    Krice, Sep 27, 2012
    #2
    1. Advertising

  3. Brian

    BGB Guest

    On 9/27/2012 3:44 AM, Brian wrote:
    > I have not found an answer to the question why C++ is the most preferred
    > language. I thought it would be a good question to ask in this newsgroup
    > that has programmers that have been using C++ for a while.
    > I did read that its popular because it can be transferred to other
    > platforms but not everyone has more than one platform.
    >


    because it sucks less than the other options?...


    many people tend to thing of things in terms of being "better" or "more
    preferable" (like there is some significant "good" that pulls people to
    a particular solution), but I suspect this may be backwards.

    I suspect, instead, people tend to avoid serious drawbacks, and the
    option the with least serious drawbacks wins by default.

    historically, both C and C++ have been in a fairly good spot here.
    this may be partly due to being reasonably free of crippling design
    flaws (or, at least real design flaws, as opposed to people complaining
    that it doesn't really follow idiom-X or fad-Y or prevents bad-practice-Z).

    whereas, many other languages have had maybe a few nifty features, but
    often at the cost of being seriously crippled or broken in some other
    area (often denied, downplayed, or claimed to actually be a feature, by
    people who endorse the language...).

    usually, this is not about idioms, but rather, things which impede using
    the language in one way or another (such as awkward or unreadable
    syntax, broken semantics, ...), or limit its effectiveness at performing
    an operation (such as arbitrary limitations, poor performance, tendency
    to misbehave or be overly difficult to debug, ...).



    so, most people largely end up using what works...

    though, this is not to say it is perfect either, for that matter...
     
    BGB, Sep 27, 2012
    #3
  4. On Sep 27, 9:44 am, Brian <> wrote:

    > I have not found an answer to the question why C++ is the most preferred
    > language. I thought it would be a good question to ask in this newsgroup
    > that has programmers that have been using C++ for a while.
    > I did read that its popular because it can be transferred to other
    > platforms but not everyone has more than one platform.


    to some extent its momentum, it's popular because it's popular. It's
    apparent similarity to C probably has some historical significance. As
    others have noted efficiency and access to the underlying machine is
    important.

    I'm curious, why do you care?
     
    Nick Keighley, Sep 27, 2012
    #4
  5. Brian

    Guest

    Am Donnerstag, 27. September 2012 10:44:23 UTC+2 schrieb Brian:
    > I have not found an answer to the question why C++ is the most preferred language. I thought it would be a good question to ask in this newsgroup that has programmers that have been using C++ for a while. I did read that its popular because it can be transferred to other platforms but not everyonehas more than one platform. -- Regards Brian


    1) As Krice already mentioned its multi-paradigm is a big advantage. Even
    in the same project you can switch between structural programming,
    object-based programming and object-oriented programming. Of course one
    would prefer OO but often there is working legacy ANSI-C (or even K&R-C)
    code that has to be used.

    2) My favorite reason is: because C++ is *alive* ! I don't know no other
    language that has changed so much over time.

    I can remember when the first compilers came out that really could
    handle templates. It took quite a while for the C++ community to get
    behind that new feature. The outcome was the STL and a totally new
    programming paradigm: generic programming.

    Now with C++11 the language recently changed even further. There are
    now multi-core CPUs everywhere. And thus support for multithreading
    (*finally*) has been added to C++.

    And all this did not break existing code! With your newest top-notch
    C++ compiler you can still compile your old K&R stuff from 1978 ...
     
    , Sep 27, 2012
    #5
  6. Brian

    Lynn McGuire Guest

    On 9/27/2012 4:38 AM, BGB wrote:
    > On 9/27/2012 3:44 AM, Brian wrote:
    >> I have not found an answer to the question why C++ is the most preferred
    >> language. I thought it would be a good question to ask in this newsgroup
    >> that has programmers that have been using C++ for a while.
    >> I did read that its popular because it can be transferred to other
    >> platforms but not everyone has more than one platform.
    >>

    >
    > because it sucks less than the other options?...


    +1

    Lynn
     
    Lynn McGuire, Sep 27, 2012
    #6
  7. Brian

    Rui Maciel Guest

    Paavo Helde wrote:

    > It isn't. Some other languages like C, Java and Objective-C are more
    > popular. See
    > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html


    Again with this TIOBE nonsense. Using the tiobe index to base any claim on
    the popularity of a programming language makes as much sense as searching
    for the name of a programming language on youtube, and claiming that it is
    more popular than another because the search returned more hits. Because
    that's precisely how the the people behind TIOBE rank programming languages.


    Rui Maciel
     
    Rui Maciel, Sep 27, 2012
    #7
  8. Brian

    Rui Maciel Guest

    wrote:

    > 2) My favorite reason is: because C++ is *alive* ! I don't know no other
    > language that has changed so much over time.


    If you are a fan of C++ because of that then you would love Fortran.


    Rui Maciel
     
    Rui Maciel, Sep 27, 2012
    #8
  9. Brian

    Brian Guest

    BGB <> wrote:
    > On 9/27/2012 3:44 AM, Brian wrote:
    >> I have not found an answer to the question why C++ is the most preferred
    >> language. I thought it would be a good question to ask in this newsgroup
    >> that has programmers that have been using C++ for a while.
    >> I did read that its popular because it can be transferred to other
    >> platforms but not everyone has more than one platform.
    >>

    >
    > because it sucks less than the other options?...
    >
    >
    > many people tend to thing of things in terms of being "better" or "more
    > preferable" (like there is some significant "good" that pulls people to a
    > particular solution), but I suspect this may be backwards.
    >
    > I suspect, instead, people tend to avoid serious drawbacks, and the
    > option the with least serious drawbacks wins by default.
    >
    > historically, both C and C++ have been in a fairly good spot here.
    > this may be partly due to being reasonably free of crippling design flaws
    > (or, at least real design flaws, as opposed to people complaining that it
    > doesn't really follow idiom-X or fad-Y or prevents bad-practice-Z).
    >
    > whereas, many other languages have had maybe a few nifty features, but
    > often at the cost of being seriously crippled or broken in some other
    > area (often denied, downplayed, or claimed to actually be a feature, by
    > people who endorse the language...).
    >
    > usually, this is not about idioms, but rather, things which impede using
    > the language in one way or another (such as awkward or unreadable syntax,
    > broken semantics, ...), or limit its effectiveness at performing an
    > operation (such as arbitrary limitations, poor performance, tendency to
    > misbehave or be overly difficult to debug, ...).
    >
    >
    >
    > so, most people largely end up using what works...
    >
    > though, this is not to say it is perfect either, for that matter...


    Delphi use to be popular because it had a good structure when writing code.
    I have programmed in Visual Basic but after a while the structure starts to
    look untidy with too many programming words and so the program flow can be
    difficult to see. So I'm looking at other programming languages and notice
    that many seem to follow C with the curly brackets etc.
    If I were to ask software companies what language the program they are
    selling in written in then I have a feeling the answer would be either C or
    C++.
    There are many programming languages to chose from but for some reason
    people seem to chose C++ maybe its the language that's taught in schools.

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #9
  10. Brian

    Brian Guest

    Nick Keighley <> wrote:
    > On Sep 27, 9:44 am, Brian <> wrote:
    >
    >> I have not found an answer to the question why C++ is the most preferred
    >> language. I thought it would be a good question to ask in this newsgroup
    >> that has programmers that have been using C++ for a while.
    >> I did read that its popular because it can be transferred to other
    >> platforms but not everyone has more than one platform.

    >
    > to some extent its momentum, it's popular because it's popular. It's
    > apparent similarity to C probably has some historical significance. As
    > others have noted efficiency and access to the underlying machine is
    > important.
    >
    > I'm curious, why do you care?


    I ask myself why should people program in C++ when Visual Basic is easier
    to understand?
    There must be a reason why C++ is chosen when there are many other
    languages to chose from.
    Maybe some people grow up with C and then moved on to C++ and its close to
    what they had used in the past.

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #10
  11. Brian

    Brian Guest

    <> wrote:
    > Am Donnerstag, 27. September 2012 10:44:23 UTC+2 schrieb Brian:
    >> I have not found an answer to the question why C++ is the most preferred
    >> language. I thought it would be a good question to ask in this newsgroup
    >> that has programmers that have been using C++ for a while. I did read
    >> that its popular because it can be transferred to other platforms but
    >> not everyone has more than one platform. -- Regards Brian

    >
    > 1) As Krice already mentioned its multi-paradigm is a big advantage. Even
    > in the same project you can switch between structural programming,
    > object-based programming and object-oriented programming. Of course one
    > would prefer OO but often there is working legacy ANSI-C (or even K&R-C)
    > code that has to be used.


    I like a structured language but it must be difficult lining up those curly
    brackets when trying to read a C++ program.

    >
    > 2) My favorite reason is: because C++ is *alive* ! I don't know no other
    > language that has changed so much over time.


    But the code is still the same unless they have added more code commands.

    >
    > I can remember when the first compilers came out that really could
    > handle templates. It took quite a while for the C++ community to get
    > behind that new feature. The outcome was the STL and a totally new
    > programming paradigm: generic programming.
    >
    > Now with C++11 the language recently changed even further. There are
    > now multi-core CPUs everywhere. And thus support for multithreading
    > (*finally*) has been added to C++.
    >
    > And all this did not break existing code! With your newest top-notch
    > C++ compiler you can still compile your old K&R stuff from 1978 ...


    I can see that this would be an advantage. If I came across c++ code in a
    old book then it should still work.

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #11
  12. Brian

    Brian Guest

    Paavo Helde <> wrote:
    > Brian <> wrote in news:792154042370428054.785525bclark-
    > :
    >
    >> I have not found an answer to the question why C++ is the most preferred
    >> language.

    >
    > It isn't. Some other languages like C, Java and Objective-C are more
    > popular. See
    > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
    >
    > In principle, one should choose the language according to the problem what
    > one is trying to resolve. If one is planning to do a multi-million line
    > complex and fast system, C++ is a good candidate (along with Ada and some
    > others). OTOH, a hundred line program can be written in anything.


    In that case what is Visual Basic useful for?

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #12
  13. Brian

    Brian Guest

    Paavo Helde <> wrote:
    > Rui Maciel <> wrote in
    > news:k425g6$hvo$:
    >
    >> Paavo Helde wrote:
    >>
    >>> It isn't. Some other languages like C, Java and Objective-C are more
    >>> popular. See
    >>> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

    >>
    >> Again with this TIOBE nonsense. Using the tiobe index to base any
    >> claim on the popularity of a programming language makes as much sense
    >> as searching for the name of a programming language on youtube, and
    >> claiming that it is more popular than another because the search
    >> returned more hits. Because that's precisely how the the people
    >> behind TIOBE rank programming languages.

    >
    > Yeah, I brought up TIOBE as it looked like an exact match for the OP-s
    > weird claim ("C++ is the most preferred language"). All this popularity
    > stuff is quite meaningless anyway, so counting hits is no worse or better
    > than any other method IMO. PHP is very popular, it does not mean that it
    > would be a good idea to write my image analysis code in PHP.
    >
    > Cheers
    > Paavo


    Most of those surveys seem to have C++ at or near the top of the list.
    To put it another way why should C++ be more popular than Visual Basic as
    Visual Basic is easy to learn and there is less code to write?

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #13
  14. Brian

    Brian Guest

    Scott Lurndal <> wrote:
    > Rui Maciel <> writes:
    >> wrote:
    >>
    >>> 2) My favorite reason is: because C++ is *alive* ! I don't know no other
    >>> language that has changed so much over time.

    >>
    >> If you are a fan of C++ because of that then you would love Fortran.

    >
    > Or object-oriented COBOL.
    >
    > There's still a lot of COBOL running out there in legacy systems.
    >
    > scott


    From memory Fortran was a Science language and Cobol was a Business
    language. It didn't think that those languages were still supported then
    again there are still some Quick Basic programmers.

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #14
  15. Brian

    Brian Guest

    Brian <> wrote:
    > I have not found an answer to the question why C++ is the most preferred
    > language. I thought it would be a good question to ask in this newsgroup
    > that has programmers that have been using C++ for a while.
    > I did read that its popular because it can be transferred to other
    > platforms but not everyone has more than one platform.


    Correct me if I'm wrong but I see some programming languages as having
    restrictions such as if I wanted to colour a ball then I might only have
    the colours that the programing language offers me but what if I didn't
    like the choices and wanted a different colour or maybe I wanted a shape
    like a pear instead of a circle shaped ball but the only shapes offered
    were square and circle. Maybe languages like C++ gives the programmer more
    scope to design exactly what the programmer wants.
    I know that early programming languages such as Basic had these
    restrictions.

    --
    Regards Brian
     
    Brian, Sep 28, 2012
    #15
  16. Brian

    Ian Collins Guest

    On 09/28/12 03:56 PM, Brian wrote:
    > Nick Keighley<> wrote:
    >> On Sep 27, 9:44 am, Brian<> wrote:
    >>
    >>> I have not found an answer to the question why C++ is the most preferred
    >>> language. I thought it would be a good question to ask in this newsgroup
    >>> that has programmers that have been using C++ for a while.
    >>> I did read that its popular because it can be transferred to other
    >>> platforms but not everyone has more than one platform.

    >>
    >> to some extent its momentum, it's popular because it's popular. It's
    >> apparent similarity to C probably has some historical significance. As
    >> others have noted efficiency and access to the underlying machine is
    >> important.
    >>
    >> I'm curious, why do you care?

    >
    > I ask myself why should people program in C++ when Visual Basic is easier
    > to understand?


    Because it can only be used on windows?

    --
    Ian Collins
     
    Ian Collins, Sep 28, 2012
    #16
  17. Brian

    Rui Maciel Guest

    Brian wrote:

    > I ask myself why should people program in C++ when Visual Basic is easier
    > to understand?


    Visual Basic is far from being free from criticism.

    Nevertheless, some people don't program in C++ or even know how to, and they
    still do quite well using some other programming language. There are plenty
    of alternatives out there, and they aren't necessarily better or worse than
    C++: only different.


    Rui Maciel
     
    Rui Maciel, Sep 28, 2012
    #17
  18. On Sep 28, 4:56 am, Brian <> wrote:
    > Nick Keighley <> wrote:
    > > On Sep 27, 9:44 am, Brian <> wrote:


    > >> I have not found an answer to the question why C++ is the most preferred
    > >> language. I thought it would be a good question to ask in this newsgroup
    > >> that has programmers that have been using C++ for a while.
    > >> I did read that its popular because it can be transferred to other
    > >> platforms but not everyone has more than one platform.

    >
    > > to some extent its momentum, it's popular because it's popular. It's
    > > apparent similarity to C probably has some historical significance. As
    > > others have noted efficiency and access to the underlying machine is
    > > important.

    >
    > > I'm curious, why do you care?

    >
    > I ask myself why should people program in C++ when Visual Basic is easier
    > to understand?


    !!!!

    Visual Basic I've seen looks pretty messy and it locks you to windows.

    > There must be a reason why C++ is chosen when there are many other
    > languages to chose from.


    portabilty, low level access if needed, efficiency, portable,
    availability of programmers, availability of programming environments

    > Maybe some people grow up with C and then moved on to C++ and its close to
    > what they had used in the past.


    yes
     
    Nick Keighley, Sep 28, 2012
    #18
  19. On Sep 28, 4:56 am, Brian <> wrote:
    > BGB <> wrote:
    > > On 9/27/2012 3:44 AM, Brian wrote:
    > >> I have not found an answer to the question why C++ is the most preferred
    > >> language. I thought it would be a good question to ask in this newsgroup
    > >> that has programmers that have been using C++ for a while.
    > >> I did read that its popular because it can be transferred to other
    > >> platforms but not everyone has more than one platform.

    >
    > > because it sucks less than the other options?...

    >
    > > many people tend to thing of things in terms of being "better" or "more
    > > preferable" (like there is some significant "good" that pulls people toa
    > > particular solution), but I suspect this may be backwards.

    >
    > > I suspect, instead, people tend to avoid serious drawbacks, and the
    > > option the with least serious drawbacks wins by default.

    >
    > > historically, both C and C++ have been in a fairly good spot here.
    > > this may be partly due to being reasonably free of crippling design flaws
    > > (or, at least real design flaws, as opposed to people complaining that it
    > > doesn't really follow idiom-X or fad-Y or prevents bad-practice-Z).

    >
    > > whereas, many other languages have had maybe a few nifty features, but
    > > often at the cost of being seriously crippled or broken in some other
    > > area (often denied, downplayed, or claimed to actually be a feature, by
    > > people who endorse the language...).

    >
    > > usually, this is not about idioms, but rather, things which impede using
    > > the language in one way or another (such as awkward or unreadable syntax,
    > > broken semantics, ...), or limit its effectiveness at performing an
    > > operation (such as arbitrary limitations, poor performance, tendency to
    > > misbehave or be overly difficult to debug, ...).

    >
    > > so, most people largely end up using what works...

    >
    > > though, this is not to say it is perfect either, for that matter...

    >
    > Delphi use to be popular because it had a good structure when writing code.
    > I have programmed in Visual Basic but after a while the structure starts to
    > look untidy with too many programming words and so the program flow can be
    > difficult to see. So I'm looking at other programming languages and notice
    > that many seem to follow C with the curly brackets etc.
    > If I were to ask software companies what language the program they are
    > selling in written in then I have a feeling the answer would be either C or
    > C++.


    yes but that's just a feeling. Complex products are often programmed
    in a variety of languages. Languages like Python and Ruby are quick to
    develop in but sometimes run rather sluggishly. C++ can be used in the
    important bits to make everything go faster. Java is pretty popular as
    is C#. Though you might see them as having a C-like syntax.

    > There are many programming languages to chose from but for some reason
    > people seem to chose C++ maybe its the language that's taught in schools.
     
    Nick Keighley, Sep 28, 2012
    #19
  20. On Sep 28, 5:17 am, Brian <> wrote:
    > Paavo Helde <> wrote:
    > > Rui Maciel <> wrote in
    > >news:k425g6$hvo$:

    >
    > >> Paavo Helde wrote:

    >
    > >>> It isn't. Some other languages like C, Java and Objective-C are more
    > >>> popular. See
    > >>>http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

    >
    > >> Again with this TIOBE nonsense.  Using the tiobe index to base any
    > >> claim on the popularity of a programming language makes as much sense
    > >> as searching for the name of a programming language on youtube, and
    > >> claiming that it is more popular than another because the search
    > >> returned more hits.  Because that's precisely how the the people
    > >> behind TIOBE rank programming languages.

    >
    > > Yeah, I brought up TIOBE as it looked like an exact match for the OP-s
    > > weird claim ("C++ is the most preferred language"). All this popularity
    > > stuff is quite meaningless anyway, so counting hits is no worse or better
    > > than any other method IMO. PHP is very popular, it does not mean that it
    > > would be a good idea to write my image analysis code in PHP.

    >
    > > Cheers
    > > Paavo

    >
    > Most of those surveys seem to have C++ at or near the top of the list.
    > To put it another way why should C++ be more popular than Visual Basic as
    > Visual Basic is easy to learn and there is less code to write?


    only until you start doing real work (ie. non-GUI). As poited out
    before Visual Basic is totally tied to Windows.
     
    Nick Keighley, Sep 28, 2012
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Roberts

    Why is OO popular?

    Ian Roberts, Apr 19, 2004, in forum: C++
    Replies:
    5
    Views:
    472
  2. Karlo Lozovina
    Replies:
    1
    Views:
    329
    Jonathan Ellis
    Apr 16, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,263
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    141
    Views:
    3,256
    John W. Kennedy
    Feb 23, 2007
  5. Bruno Desthuilliers

    Why PHP is so much more popular for web-development

    Bruno Desthuilliers, Jul 22, 2007, in forum: Python
    Replies:
    37
    Views:
    831
    SamFeltus
    Jul 27, 2007
Loading...

Share This Page