Jump to content

is c++ really a joke?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
20 replies to this topic

#1
Guest_x42_*

Guest_x42_*
  • Guests
I heard somewhere that c++ was meant as a joke

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
No, it wasn't. People who don't like C++ sometimes do a parody interview of Bjarne that presents that view, but it's just a parody.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts
The interview was a joke, but many of the idiosyncracies of the C++ mentioned there are actually true. If you compare C++ to any modern high-level programming language, C++ really looks like a joke (a fancy macro assembly pretending to be a multiparadigm language really is a joke). Anyway, who knows C++ really well AND likes it? I do not know any such person.

Fran Allen, one of the pioneers in compiler technology, said that wide adoption of C and C++ was one of the greatest disaster that blocked development of optimizing compiler technology for several years.

#4
alaukik

alaukik

    Newbie

  • Members
  • PipPip
  • 17 posts
i think this is the interviewyou are talking about
it was a joke.
your question was also a joke.
when so many major applications have been made in c++
would you belive that c++ was a joke?i wouldn't belive even if Bjarne Stroustrup came to my home to tell that

#5
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts
Many web apps have been made in PHP, but that doesn't mean PHP was not a joke. :D
Just too many people were enough naive to believe the hype that C++ is the right tool for application programming.
C++ gained popularity only because of the backwards compatibility with C, not because of its design being better than the other languages.

#6
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Heh, that article made me smile, he's got a few points! Let me tell you, though, C++ is by no means a joke. To many it is a religion, to some it is therapy, to others a piñata. But never a joke.
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#7
abzero

abzero

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 217 posts
C++ is a great language, as are some of the others. Right tool for the right job. Interestingly according to a quote I read; C++ was designed for good programmers to make great programs. If you think of history that kind of makes sense, but not any more. Thing is it's possible to write a bad program in any language, it's the programmer that matters (think perl as an example!)

Now for Gui's building then using C++ would probably be a mistake (I havn't any experance of Qt so cannot comment on that.) Although please, please don't use Java...if you do make it look good! (I have seen one to many expensive commercial programs with really poor java front ends....)

But if you need to say implement a good network stack, or a file loading algorithm, etc then C++/C might be a better choice.

Anyway, when designed well C++ programs can be great. When designed poorly there as bad as any bad program.

#8
abzero

abzero

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 217 posts

JCoder said:

Anyway, who knows C++ really well AND likes it? I do not know any such person.
I would say I have a healthy good knowledge of the language and still like it.

JCoder said:

Fran Allen, one of the pioneers in compiler technology, said that wide adoption of C and C++ was one of the greatest disaster that blocked development of optimizing compiler technology for several years.

I can understand that, the one of the issues would be address broadcasting, and with C++/C and pointers that can be a big issue block some optimizing stuff.

#9
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts

Quote

I can understand that, the one of the issues would be address broadcasting, and with C++/C and pointers that can be a big issue block some optimizing stuff.
Pointers are just one of the problems. C/C++ are just too low level. They are effectively an assembly with a nicer syntax, helping to deal with some common patterns (like procedures or objects).
This causes that C++ forces to overspecify solutions of the problems, even a simple thing like looping through a collection cannot be written without involving an iterator variable. The compiler is restricted just to some very low-level optimizations like register allocation and loop-unrolling, which is pretty straightforward.

Quote

C++ was designed for good programmers to make great programs
No, C++ was designed as a better C, theoretically for systems-programming. It failed at that. Systems programming is still mostly done in C. Great AI programmers used LISP at that time. Great programmers stay away from unproductive tools (read what the interviewees of Coders at Work say about C++).

#10
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I find it interesting that you use iterators as an example of C++ being limited, yet Java finally added iterators to make certain types of looping easier on collections.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#11
abzero

abzero

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 217 posts

JCoder said:

This causes that C++ forces to overspecify solutions of the problems, even a simple thing like looping through a collection cannot be written without involving an iterator variable. The compiler is restricted just to some very low-level optimizations like register allocation and loop-unrolling, which is pretty straightforward.
The thing is, in C++ you are not restricted to using iterators. I mean if you want to use the STL then you may need to; but that's just one implementation. You can implement somthing else yourself if you wanted. I personally find the Java and C# for/foreach which implicently uses iterators a little uneasy; I don't like that idea of an interface (which is somthing the programmer designes for the application) being used for a language internals, I personally think they should be seperate.

The compiler can do more than just those, there's inlining which is an under-developed concept, return as reference optimisations, temporary elimination etc.

Quote

No, C++ was designed as a better C, theoretically for systems-programming. It failed at that. Systems programming is still mostly done in C. Great AI programmers used LISP at that time. Great programmers stay away from unproductive tools (read what the interviewees of Coders at Work say about C++).

I was quoting someone who was involved in the developement of C++, would need to find that quote again to reference it properly. C++ added object orientation to an already powerful language. As you say C was used everywhere and the majority of programmers knew it, that ment that this new way of programing we given to the majority, rather then left in the ivory towers of the HLL users.

But anyway, I would say that Great programmers use the right tool for the right job.

Also looks like Coders at Work is an interesting book...I'll add that to my ever expanding list of books to read.

#12
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts

Quote

The thing is, in C++ you are not restricted to using iterators. I mean if you want to use the STL then you may need to; but that's just one implementation. You can implement somthing else yourself if you wanted

No, I cannot implement anything better, because I'm restricted by the lack of abstract features in C++. The low-level side of C++ is always going to haunt you. Every time you need a new object, you face a question: on the stack or on the heap? Who is going to free it? This is a low-level aspect, you cannot hide. The same applies to passing arguments - by pointer / by ref / by value? In HLLs you don't need to focus on such things.