What is wrong with C++ FQA?

Pages: 12
closed account (EzwRko23)

Again: so? Things that are big, visible, iconic, oft used, etc always get the most crap.


Well, Java is used much more in industry than C++ and yet no-one writes books "Exceptional Java" or "Java FQA". There is just one big flaw in the Java language: generic type erasure. And it can still be fixed, and probably will be at some time in the future.




All of his responses are rephrases of the exact same complaints:
- C++ has new features to replace C approaches
- slow compile time
- templates have incomprehensible errors


Oh, why not write it even shorter?
As Bertrandt Meyer said:
"There are only two things wrong with C++: The initial concept and the implementation."



Just what I remembered from FQA:
- problematic exception-safety
- no language support for threads
- weak type system
- constness inconsistencies
- && || operator overloading semantic inconsistency
- lack of proper OOP encapsulation and standard ABI
- diamond inheritance problem
- complicated method implementation resolution rules
- friend, no modularity support
- umbiguous grammar

These are not rephrases of only 3 points. These are different things.


"There are 2 kinds of programming langauges. Ones that everyone complains about, and ones that nobody uses."


This is a poor excuse of BS for not coming up with a better design. C++ was designed with some goals in mind, but these goals are now obsolete (4 bytes more per object? who cares?). So there will be more and more people complaining of and quitting C++. There are lots of languages people use more often than C++ and don't complain about (Java, Python, Ruby, C# are ones of the most spectacular examples).
Last edited on
Well, Java is used much more in industry than C++


This is a loaded statement that cannot possibly be supported with factual evidence.

I could just as easily claim the exact opposite.

- problematic exception-safety


"problematic" how? Problematic in that you should be aware that exceptions exist?

- no language support for threads


This is changing with the next update. Besides there are threading libs commonly available, so the point is rather moot.

If you want to exclude available libraries when summarizing languages... I could make a long list of things those other languages you mentioned can't do. Python in particular is near useless without additional libs.

- lack of proper OOP encapsulation


Waaat? How so? I don't have any problem encapsulating my classes.

- diamond inheritance problem


One could just as easily claim that lack of multiple inheritance (the only solution to this problem) is an equally large problem.

- complicated method implementation resolution rules


Example? I don't understand what you mean by this one.

There are lots of languages people use more often than C++ and don't complain about (Java, Python, Ruby, C# are ones of the most spectacular examples).


You're kidding, right?

You really think people don't complain about those languages? Are you trying to make yourself sound uncredible?
Last edited on
Please stop feeding it,
it has already said a lot of stuff regarding the points above, I've read enough of that
EDIT: I didn't see your post Bazzy, but I'll keep this post. There's little it can get from it, but if it answers my questions then we get something from it.

There are lots of languages people use more often than C++ and don't complain about (Java, Python, Ruby, C# are ones of the most spectacular examples).


Where did you hear that Java, Python, Ruby, or (inclusively but not combined) C# are used more (in the industry or out) than C++? Direct link to the source?

Well, Java is used much more in industry than C++ and yet no-one writes books "Exceptional Java" or "Java FQA".


So you can't see why fewer people would just get frustrated by Java (due to it being so easy to program in and the general wits of the public, no offense general public) and try to find every little bug (which I'm sure there are tons that nobody looked into) there is and put it in one document which would later be found out to be a thinly disguised rant?

Finally, please tell us exactly why you're so hell-bent on... converting?... us. If you cannot give a logically sound reason that we haven't heard before, we will have to assume that you are simply a common troll. I will probably cease a good amount of programming in C++ because my own language requires a considerably less elaborate translation between what's in my head and what goes in the program, however C++ is still the best language for me for programming various applications in to date. Even Java and Python fall short. The one that comes the closest is FASM Assembly (jk).

-Albatross


Last edited on
@Bazzy

I guess you're right.

I was thinking he was looking for a legitimate discussion, but now that I look back it really is rather apparent that he's just trolling.

Oh well =P
closed account (EzwRko23)
Thanks Albatross... Yummy...



This is a loaded statement that cannot possibly be supported with factual evidence.

Where did you hear that Java, Python, Ruby, or (inclusively but not combined) C# are used more (in the industry or out) than C++? Direct link to the source?


Simple jobs statistics. There are over 2x as many jobs for Java programmers than for C++.
Demand for people is a good indicator of what languages are used in the industry.
Open any general job search page and see it for yourself. E.g. jobs.com:
"java programmer" - 660 hits
"c# programmer" - 419 hits
"c++ programmer" - 313 hits
"python programmer" - 82 hits
"ruby programmer" - 54 hits


"problematic" how? Problematic in that you should be aware that exceptions exist?

No. But exception safety is tricky to get right.


This is changing with the next update. Besides there are threading libs commonly available, so the point is rather moot.


1. The next update has not been even standardized yet. It will take probably another few years for the compilers to catch up (they **still** have problems with the current standard from 2003).
2. Thread-based concurrency is a technology of yestarday. The future is STM and message-passing model. What has the next update of C++ to offer in this case? Nothing.
3. Library-enabled threads are slow compared to the native thread support. Many thread-related optimisations like lock ellision are not possible in C++ now; and won't be in C++1x.


Waaat? How so? I don't have any problem encapsulating my classes


Private class members exposed in the public interface of the module is exactly what is called "no encapsulation". Change a private member - world recompiles, ABI breaks.


One could just as easily claim that lack of multiple inheritance (the only solution to this problem) is an equally large problem.


Python, Ruby and Scala do provide multiple implementation inheritance, but without the diamond problem. They got it right, C++ got it wrong.


- Complicated method implementation resolution rules
Example? I don't understand what you mean by this one.


One of the simpliest examples, without involving method overloading:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class A {
public:
  virtual void printMessage1() { cout << "Foo"; }
  virtual void printMessage2(string message = "C++ sucks") { cout << message; }
};

class B : public A {
public:
  virtual void printMessage1() { cout << "Bar"; }
  virtual void printMessage2(string message = "C++ rocks") { cout << message; }
};

int main() {
  A* object = new B();
  object->printMessage1();  // what gets printed?
  object->printMessage2();  // what gets printed?
}



You really think people don't complain about those languages?


Of course they complain. But they usually complain about implementation, bugs etc. Things that are easy to fix and get fixed fast. C++ is different. People complain about the design. The only another language that gets so much critics on its design is PHP.


@Bazzy, you don't need to read that, if you don't like it.
But some people on this forum agreed with me, at least partially.
In some tiny one,yes.
This is that working example being reprinted everywhere which
someone had decided to describe all the advantages. By what reason?
No one knows now.
I would say from practical point of view it is absolutely u s e l e ss except for
as an advertisement. Also these languanges are products to be sold
because of pumped investments into the developement where the logic surrenders to
a trade relationships hurting a language really and sometimes mutilating to nothing
but a short term specific accesorry.

P.S.
The example is being attempted to simulate by many beyound the C/C++ scope.
That's an interesting example. It's a gotcha, but it does make perfect sense. The compiler has to generate the parameters that will be passed to the function at compile time, and it can't know what object points to then.
Last edited on
Xorebxebx: I've just one thing to say.

1) You did not provide a direct link, which I would very much like. Surely you can see why.
1) Higher requests for a job does not mean a higher demand, as maybe there are fewer people answering those demands. Surely you could see that.
1) There's a chance of bias; that on certain sites, there'll be more advertising for a certain type of job. Surely you can see why.
1) You still haven't told us why you're hell-bent on converting us. At least I'm still giving you a chance. Several veterans (if not most) already have you down as a troll, and I'm beginning to agree with them. Surely you can see that.
1) We would like more citations of your statistics, else at least I will mostly ignore them. Surely you can see why.
1) EDIT: Bolded the most important text. Surely you can see that.
1) I've said my one thing, and I choose to stop here before I say another thing. Surely you can see why. ;)

-Albatross
Last edited on
closed account (EzwRko23)
I'm not converting you. You are inconvertible in your blind love to C++ (this is actually good for me, because I can write software 10x faster than you, so you don't count as a competition for my company).

But I can see lots of frustrated freshmen posting on this forum, fighting with the language, instead of fighting with the domain problem they have to solve. Many of them don't know, that C++ is one of the worst languages for the beginners. So if any of them take a different, easier route, it will be a good thing.

Satisfied?
Last edited on
Xorebxebx, I made it perfectly clear in another thread that I'll be switching to my own language once the compiler reaches an alpha stage so unfortunately you cannot call me a blind C++ lover and be correct about it. Also, I have engineered several C++ code generators and libraries to reduce development time, so the time it takes each of us to develop a program that compiles to native machine code is debatable. Trust me, I'm a true insane programmer.

So you're fighting for the beginners, eh? Somehow that sounds like it was made up on the spot, but assuming that's the real reason: is it possible that maybe the ones you talked about just didn't have a good education about the language and/or were just too lazy?

-Albatross
oh hai I only use one language for EVERYTHING cause I'mma nimrod.

Real programmers don't learn languages, they learn the process of learning languages.
I have heard that some of you find the C++ FQA reasoning flawed. But I have never heard of anyone saying what exactly is wrong with it (except that sometimes its form is too emotional).


You mean besides the fact that it is a complete waste of time for C++ programmers to read? It's counter productive and the writing style is not only harsh but nearly incomprehensible. It isn't very creative either. Why does this person need to piggy back on the impressive work of another and then turn it into more of a general criticism of the language itself? Well it's a free country. If someone has the time to write nonsense they can do that. However there isn't much in that which could actually help an aspiring C++ programmer to gain a better understanding of anything.
Cool, I’m going to be the noobie that jumps into this argument today.
I’m 15.
I’ve got nearly 2 years experience with screwing around with C++ on my computer, and yeah, I like it.
I’m currently studying for my CompTia A+ (which won’t be anything compared to you lot, but hey.. I’m 15.)
As you can see, I’m not qualified to have an opinion here, as to whether C++ is or isn’t a good programming language. Most of the things that were mentioned above in this thread I can’t even dream of being able to understand. I can, however, state some facts on this topic.

There’s absolutely no way that one can prove C++ is a good or bad language. Sure, you can weigh out the pros and cons, and come to somewhat of a conclusion.. But ‘good’ and ‘bad’ are subjective terms. To some people, ice cream is delicious, and to others, its terrible. This is more of an ego-war now. Each side of this discussion needs to get their point validated, and acknowledged by the other party. The fact is, there will always be as much evidence against C++ as there is for it, JUST like there will always be as much evidence that there is a god, as there is that a god doesn’t exist. This could go on for days, xorexbebx will present a very valid argument as to why C++ is a terrible language, then a member of this C++ Forum will counter with equally valid evidence as to why C++ is a wonderful language. It won’t end

Now, as this is a C++ community, I reside on the side that supports, or enjoys coding in C++, and I must speak in defense of the community as a whole.

xorebxebx wrote:
I’m not converting you. You are inconvertible in your blind love to C++ (this is actually good for me, because I can write software 10x faster than you, so you don’t’ count as a competition for my company).

Cool story bro. Now tell me why the hell you care. If you can write software 10x faster than your rival, why is it that you’re trying to keep them up to par with you? Personally, if.. say I run a manufacturing company, and I can make the same part, possibly better quality, in 10 times the time it takes for the competing company to do so, do you think I would phone them up and say, “Hey, you should really reconsider your practices, I can make the same part much faster than you can. If you want I’ll help you do so.” .. No, I wouldn’t.
I’m afraid it does appear that you’re somewhat hell-bent on ‘converting’ members of this forum away from C++. Buddy, this is a C++ forum, as I mentioned in italics above. We come here to talk about C++. Whether it’s a good language or not, that doesn’t mean we can’t use and discuss it to our own liking. It’s kind of like you’re telling a gay to get out of a gay bar because he’s gay; it just doesn’t work that way. It’s one thing to have a friendly discussion on the flaws of the language, a complete different thing to take it too far, and imposing your ideals on everyone else.
Sure, you may be able to make your software 10x faster than us, but no one seems to care. Please, by all means, go be a better, more skilled coder than any of us here. That’s fine, I’m sure I’m speaking for everyone in this forum when I say we don’t mind. Just don’t force feed your ideas to us.


-Thumper
Whoa whoa whoa, Thumper. The other members of this forum already rubbed xorebxebx's nose* quite enough (me included), and he seems to be somewhat behaving himself more recently. I recommend you just ignore him if he bothers you. That's what I'm trying to do.

-Albatross

*: And any other part of his body that we could rub to the point of creating a skin burn without feeing embarrassed.
Last edited on

Real programmers don't learn languages, they learn the process of learning languages.


For my entire 12+ years of programming career, I only subscribe to the above statement. It sums up my feeling. There is NO one programming language that is Almighty. Some business domain problems are best solved by XYZ programming language. No use insisting on ONE XYZ programming language and attempt to solve all business domain problem.

I always like to use the analogy "When it is a round hole, I use a round peg to plug it. Can I use a square peg to force it in ? Of cuz I can but not without much effort and bruises around the edges"
closed account (EzwRko23)

There is NO one programming language that is Almighty...


... except LISP. :D


Jokes aside, a real programmer should know various programming paradigms, rather than languages. Switching language inside a single paradigm is easy. Switching paradigms is not. This is why switching from C++ to Java is easier than switching from C++ to LISP or from C to Java.
Last edited on
Jokes aside, a real programmer should know various programming paradigms, rather than languages.


Agreed. Although knowing the syntax of a language is nice too, like you said, you can learn that pretty fast if you know the concepts.
That's a true point, yes. I'm just going to be saying this clear now, don't be messin' with xorebxebx; if he annoys you, ignore him. (I'm not on his side with everything he says, but this method seems to have worked so far for others, and I'm going to be applying this too, from this moment on.)

Don't cook your brain, keep it cool.
Last edited on
Topic archived. No new replies allowed.
Pages: 12