Live data from Hacker News

Why C++ is vastly superior to C

warp.povusers.org

1–10 of 123 posts

Re: Why C++ is vastly superior to C

#2

For some things, C++ is better than C. For some things Lisp is better than either, and for yet other things, Python is better than them all.

Why are people so insistent on declaring their view is absolutely right, with no arguments, everyone else is wrong, and that one language will rule them all?

Trust me. For some things I do, C is vastly superior to C++, but I'm not going to try to convince everyone that C is better than C++ (or anything else) for everything that anyone wants to do.

That would just make me look stupid.

Re: Why C++ is vastly superior to C

#3
I know that C++ has some pretty neat features, but I feel comfortable and productive enough in C. I have never really felt that there was anything in C++ that I just had to have.

If I need to something higher level there are plenty of choices of that already, and C is a great language for extending applications done in a higher level language.

I think that the author has some good points. but I think both languages have the places where they excel.

To say that one is "vastly superior" to the other is a mistake. If C++ was really "vastly superior" to C then why are so many people still using C and using it productively?

Re: Why C++ is vastly superior to C

#5

For some things, C++ is better than C. For some things Lisp is better than either, and for yet other things, Python is better than them all. Why are people so insistent on declaring their view is absolutely right, with no arguments, everyone else is wrong, and that one language will rule them all? Trust me. For some things I do, C is vastly superior to C++, but I'm not going to try to convince everyone that C is bett…

Indeed.

This article is more "why C++ makes this particular program easier to write" and is in no way any proof that C++ is better than C.

Re: Why C++ is vastly superior to C

#6
Why C is vastly superior to C++:

  $ cat > foo.c
  #include 
  int main(int argc, char**argv){
    puts("hello world");
    return 0;
  }
  ^D
  $ cat > foo.cxx
  #include 
  int main(int argc, char**argv){
    std::cout 

Re: Why C++ is vastly superior to C

#7
When the argument is that C++ has too many features that interact in unpredictable ways and are virtually impossible to get right, arguing that C++ is superior because it has more features is perhaps a fine argument in some hypothetical universe in which the primary objection to C++ is that it is missing features, but by failing to grapple with the points raised by the opposition in the real universe, you will fail to convince anybody. Everybody already knows all of these features, they're practically in the canonical Introduction to C++ pitch, and they still don't think C++ is great. Maybe you need to spend a bit more time listening more carefully to why; you certainly need to if you expect to talk anybody out of it.

Re: Why C++ is vastly superior to C

#8
post #6

Why C is vastly superior to C++: $ cat > foo.c #include int main(int argc, char**argv){ puts("hello world"); return 0; } ^D $ cat > foo.cxx #include int main(int argc, char**argv){ std::cout

Great job measuring initialization time, now how about showing real world performance differences in actual large programs.

Re: Why C++ is vastly superior to C

#9

For some things, C++ is better than C. For some things Lisp is better than either, and for yet other things, Python is better than them all. Why are people so insistent on declaring their view is absolutely right, with no arguments, everyone else is wrong, and that one language will rule them all? Trust me. For some things I do, C is vastly superior to C++, but I'm not going to try to convince everyone that C is bett…

I don't think this article is about declaring C++ the ruler of all languages.

If you have an example of C being a better fit for a problem than C++, feel free to share it.

Re: Why C++ is vastly superior to C

#10
The "final straw" is easily overcome with unions.

Also I do not buy the argument that you do not have to follow coding conventions in C++ or that explicitly freeing memory is a bad thing. Also comparing the number of lines of code to determine the "best" language is childish. By that logic the language with the largest std. lib is the best.

Post reply on HN