[was: comp.lang.c.moderated]Re: How C is better then C++

Discussion in 'C Programming' started by Stefan Ram, Dec 22, 2009.

  1. Stefan Ram

    Stefan Ram Guest

    C is smaller, which means, it is more easy to learn and to
    handle.

    »C++ is already too large and complicated for our taste«

    from a Usenet post posted by Bjarne Stroustrup

    »C++ is too complicated. At the moment, it's impossible
    for me to write portable code that I believe would work
    on lots of different systems«

    Donald E. Knuth

    »Today's C++ programs will be tomorrow's unmaintainable
    legacy code.«

    Ian Joyner

    »the largest cross platform compatible subset of C++ is C«

    http://www.artima.com/weblogs/viewpost.jsp?thread=8826

    »C++ has always been a zombie, its only drive is the C
    ghost inside it :)«

    Pascal J. Bourguignon

    <>

    »I think C++ was pushed well beyond its complexity threshold«

    Joshua Bloch

    http://gigamonkeys.com/blog/2009/10/16/coders-c++.html

    »C++ is an unbelievably huge language«

    http://blogs.msdn.com/jaredpar/archive/2009/04/21/questions-not-to-hinge-a-c-interview-on.aspx

    »it's just a garbage heap of ideas that are mutually exclusive«

    Ken Thompson

    http://gigamonkeys.com/blog/2009/10/16/coders-c++.html

    While many students learn some basic parts of C++, only few
    people should have read and understood »Modern C++ design«
    by Andrei Alexandrescu.

    »there are a lot of people programming it. But what you
    do is you force people to subset it.«

    Jamie Zawinski

    http://gigamonkeys.com/blog/2009/10/16/coders-c++.html

    »C++ is a horrible language. It's made more horrible by
    the fact that a lot of substandard programmers use it,
    to the point where it's much much easier to generate
    total and utter crap with it. Quite frankly, even if the
    choice of C were to do *nothing* but keep the C++
    programmers out, that in itself would be a huge reason
    to use C.

    In other words: the choice of C is the only sane
    choice.«

    Linus Torvalds

    http://article.gmane.org/gmane.comp.version-control.git/57918

    So, the Boost library and modern C++ design is not well
    spread knowledge. Many C++ programmers might not be able to
    understand more elaborate template definitions from Boost or
    Alexandrescu.

    For example, ask any C++ programmer to name the rules of
    »exception-safe programming in C++«, and you'll be glad to
    find some who knows what you are taking about, yet this is
    absolutely necessary for correct and secure C++ programs.

    To read a C++ program, one has to learn all the features of
    C++ that might appear in such a program. One can not rely
    on the subset one might have learned.

    C++ is full of exceptions and special rules. For example, an
    initialization "int const v = 7;" is allowed within a class
    specifier, while "double const v = 7.0;" is not. In
    "std::vector<std::vector<int>> v;" the ">>" is parsed as the
    operator ">>". "T t(u);" defines a variable t with type "T"
    and initial value "u", while "T t();" declares a function "t".
    Now guess, whether "std::vector<int> v(
    std::istream_iterator<char>( cin ),
    std::istream_iterator<char>() );" defines and initializes an
    object "v" or declares a function "v". The type "vector<bool>" is
    neither a container nor does it contain bool-objects, while
    other "vector<...>"-classes are containers containing the
    "..."-objects.

    »the bug classes C++ introduces are way scarier than the
    ones it takes off the table«

    http://www.matasano.com/log/914/c-a-cautionary-tale-or-1-hour-of-your-black-hat-trip-is-spoken-for/

    »C++ is a huge regression compared to C«

    Felix von Leitner

    http://events.ccc.de/camp/2007/Fahrplan/events/1951.en.html

    C also is more stable than C++.

    »I would try out the language as it was being developed
    and make comments on it. It was part of the work
    atmosphere there. And you'd write something and then
    the next day it wouldn't work because the language
    changed. It was very unstable for a very long period of
    time. At some point I said, no, no more.«

    Ken Thompson

    And this still happens today: Just some weeks ago »concepts«
    were removed from the next C++ standards, while already a
    lot of people assumed that C++ will have concepts, wrote
    blog posts explaining concepts and so on.

    C is more widespread thant C++, at least according too:

    2 C 16 % and raising
    4 C++ 9 % and falling

    http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

    »C++ has become a niche language, but I talk to many C++
    programmers who live in total denial about that fact.«

    http://weblogs.java.net/blog/cayhorstmann/archive/2008/01/dinosaurs_can_t_1.html

    »C++ is becoming a freak language that's parading its
    disfigurements in front of mildly disgusted but
    curiously fascinated audience.«

    http://www.relisoft.com/tools/CppCritic.html

    »If you port your Firefox add-on to IE, you may have to
    use C++. And Allen admitted that this is a bit 1998.
    "The first thing people say is 'That's horrible. No one
    programs in C++ anymore,'" he said.«

    http://www.theregister.co.uk/2008/12/11/firefox_to_ie_port/

    (Now you see, why I use "»«" quotation marks: They do not
    interfere that much with the »"« and »'« quotation marks
    already used in quotations or in source code.)

    »an interesting difference between "Effective Java" and
    "Effective C++" is that my reaction to the latter was to
    come up with a set of SOPs that mainly boil down to
    "don't use C++ feature x".«

    Bjorn Borud

    <>

    »C++ is generally regarded as the most technically
    deficient of the popular OOPLs.«

    H. S. Lahman

    <bv6je.8995$_f7.1506@trndny01>

    »There are only two things wrong with C++, The initial
    concept and the implementation.«

    Bertrand Meyer

    »C++ is a vast playground, and makes you feel smart
    when you know all of it, so you're always tempted to use
    all of it. But that's really, really hard to do well,
    because it's such a crap language to begin with. In the
    end, you just make a mess, even if you're good.«

    http://steve.yegge.googlepages.com/tour-de-babel

    »It was decisions like not using C++ and not using
    threads that made us ship the product on time.«

    Jamie Zawinski

    http://www.joelonsoftware.com/items/2009/09/23.html

    »C++ is a horrible language. It's made more horrible by
    the fact that a lot of substandard programmers use it (...)

    I've come to the conclusion that any programmer that would
    prefer the project to be in C++ over C is likely a
    programmer that I really *would* prefer to [move on], so
    that he doesn't come and [disturb] any project I'm involved
    with. (...)

    [T]wo years down the road you notice that some
    abstraction wasn't very efficient, but now all your code
    depends on all the nice object models around it, and you
    cannot fix it without rewriting your app.«

    http://lwn.net/Articles/249460/

    »As you can see, C++ is really complex, and so a few
    mistakes crept in. First of all, exceptions in
    constructors do call local destructors, but only if the
    exception is caught.«

    http://www.fefe.de/c++/

    »C++ is just an abomination. Everything is wrong with it
    in every way. So I really tried to avoid using that as
    much as I could and do everything in C at Netscape.«

    Jamie Zawinski

    http://gigamonkeys.com/blog/2009/10/16/coders-c++.html

    »Though I was not the world's leading C++ expert, I was
    a sophisticated and knowledgeable C++ user.

    So what happened? Basically I got sick of every single
    aspect of C++ being designed around higher performance
    instead of my productivity. I also got sick of
    impossible to diagnose linker errors and never being
    able to just download a library and use it. Each new
    library meant I had to build from source because C++ has
    no ABI that allows compiled code to just be used. (...)

    I wish the C++ people would wake up and realize that C++
    is drowning in its own complexity. If I had to write a
    high performance application these days I would reach
    for C. Any other application I would write in either a
    scripting or VM based language and then code the slow
    parts in C. Why not C++? Mainly because you can't get
    scripting or VM based languages to play nicely with C++
    because C++ has no ABI.«

    Pro-Phi-Psi; Tuesday, March 11, 2008

    http://prophipsi.blogspot.com/2008/03/why-i-no-longer-like-or-use-c.html (gone)

    See also:

    http://www.sysprog.net/quotec.html
    http://burks.bton.ac.uk/burks/pcinfo/progdocs/cppcrit/
    http://yosefk.com/c++fqa/defective.html
    http://www.nothings.org/computer/cpp.html
    http://www.horstmann.com/cpp/pitfalls.html
    http://steve.yegge.googlepages.com/tour-de-babel
    http://artlung.com/smorgasborg/Invention_of_Cplusplus.shtml
    http://www.kernel.org/pub/linux/docs/lkml/#s15-3
    http://www.purl.org/stefan_ram/pub/c++_lernsprache_de (my own page, in German)
     
    Stefan Ram, Dec 22, 2009
    #1
    1. Advertisements

  2. Stefan Ram

    jamm Guest

    Isn't it OOP that we should really be blaming? I believe/hope that OOP is an
    evolutionary dead end and that we will come up with something better in the
    future.

    I mostly use C++ as a 'pimped out' C. In some projects I have gone full
    blown C++ and utilized polymorphism, templates, multiple inheritance, etc..
    It can get compilcated but I also see it as more powerful then other OOP
    languages.
     
    jamm, Dec 23, 2009
    #2
    1. Advertisements

  3. Stefan Ram

    Nobody Guest

    I think that OOP is a reasonable enough concept. It isn't a silver bullet,
    but nothing ever is.

    IMHO, C++'s faults can be squarely blamed upon trying to extend C from
    a low-level systems language into a high-level applications language
    *without letting go of any of C's low-level features*.

    Without getting into the actual merits of Java, the idea of producing a
    "C++ lite" which sacrificed some of the capability and performance in
    favour of simplicity was an eminently sensible idea.
     
    Nobody, Dec 23, 2009
    #3
  4. Stefan Ram

    Ian Collins Guest

    Until they started adding some of the complexities back in!
     
    Ian Collins, Dec 23, 2009
    #4
  5. Stefan Ram

    bartc Guest

    I thought I'd give Java a try once. I downloaded 28MB' worth of zips (as 20
    x 1.44MB files; this might have been with zmodem, and probably at
    14.4Kbaud).

    After unscrambling that lot, I found I couldn't do anything without the
    documentation. But that was another 20MB to download. I decided to give it a
    miss...
     
    bartc, Dec 23, 2009
    #5
  6. Stefan Ram

    James Guest

    What's wrong with German programmers?
     
    James, Dec 23, 2009
    #6
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.