Is C++ dead?

Pages: 12345
@PanGalactic: http://www2.research.att.com/~bs/bs_faq.html#whyC

What is some of the
tons of awful cruft and tortured syntax
that is in there? (Besides a function pointer example, those are well known to be quite ugly)
I think the C compatibility is useful. Without it, I couldn't use a C parser skeleton while writing a C++ lexer. Sure, I could learn how to use the C++ skeleton, but it's more complicated and, other than namespaces, it doesn't have any benefits.
And I guess I could also define the lexer in a different function file, but then I'd have to deal with generic pointers to parameter structures.
Last edited on
And I would have had to not be lazy and bother to learn how to use classes!
I personally agree with PanGalactic. C is not a bad language but the point of C++ is that it succeeds C. Everything in the old C libraries could be replaced in C++ but just... wasn't, because of that backwards compatibility.
PanGalactic wrote:
Says the C++ programmer staring blindly at the template line noise on his screen...
I know and like a score of programming languages, encompassing a half-dozen design paradigms, not just C++. Such a direct ad hominum is unjustified and speciously uninformed.

C is a very simple, elegant language, and its effect on C++ is not ruinous. C++ has some design failings, but the vast majority of them are not related to C. What would be fair to say is that C++ has the same (few) design flaws as does C.

One of C++'s selling points (and a very compelling one) is its compatibility with C. We wouldn't be sitting around having this discussion on this forum right now if C++ were not compatible with C.


I find that the most troubling aspects of C++ stem from the template system and the STL.
C++ is not one of my favorite languages, but it is far from one I dislike. That, of course, is opinion.

Fact is that people hate Java because it has significantly many design flaws. You can google them easily enough for yourself.

Likewise, there are people who love Java because of the way it solves certain problems. Again, you can find plenty of hype online.


I don't attack you for having an opinion, even if I think it is silly or uninformed. I may attack the premise. But not you.
++Duoas;
I just gotta ask, to see if I agree with your opinion: what is it about the templates that you dislike?
For one, have you ever seen a template error? If you have, you know the kind I'm talking about.
computerquip wrote:
Java is a piece of shit. I would almost NEVER EVER EVER EVER EVER EVER use Java. I simply see 0% reason.
.

Hedging your bets eh?
I think the emphasis was on almost.

I don't get why anyone would turn to fight back say "I know you are but what am I?"
But that's just me, personally I think there is valid reason why both are taught, both have different uses, and both are fundamentally different in the way they work.

Really I the only things I think sux with Java is the lack of operator overloading and the JVM being what it is.(lag machine) And there's certain aspects of Java I would love to see in C++.

Java was based purely off C++ for a reason, to be fundamentally different but still have the power C++ has. It doesn't have the low level aspect to it, but it still has many great uses and I think where Java gets all it's hype from is beginner programmers who feel Java is a much easier language to learn than C++, due to not having to deal with most of the low level stuff, and being pretty much fully OO.
Last edited on
With reflection, you can do all sorts of cool things in Java that you can't even consider in C++. They're different languages for different environment with a great deal of overlap. It seems traditional for C++ folk to bash Java once in a while and vice versa. It probably all goes back to the fights C++ had with Smalltalk years ago. They were much worse than the benign jabs you get now.

Regarding C++ syntax, if C++ was not compatible with C in syntax and performance, it would never have gained widespread use at Bell Labs and the rest of the world. But now we recognise the lanuages as different, and with the C++0x, it's taking another step away.

The worst part of C++ though is the complexity. I think it's hugely more complex than its author intended. The cost of entry for a developer or a tool writer is quite high.

I think the best part of C++ is it's generic progamming facilities. They're mind-blowing.
closed account (S6k9GNh0)
I just hate Java. People use it way to often for no reason. I will admit that C and C++ is a complex language but there are other languages you can learn that don't rely on a virtual machine or interpreter to execute and are still relatively decent in performance. Cross-platform able code isn't even a reason to use Java anymore.
Last edited on
Slowness in Java does not come from the VM. Especially with JIT.

The point with Java is that it has a VM, so you can compile and distribute your program once, and it will work anywhere.

Unlike C++, which you must modify for OS differences and recompile everywhere.
@Duoas,
yeah, but you're still restricted only to platforms that support the JVM, aren't you? So in some cases, having an AOT compiler is better... Then again, there is the GNU Java Compiler.

tummychow wrote:
I personally agree with PanGalactic. C is not a bad language but the point of C++ is that it succeeds C. Everything in the old C libraries could be replaced in C++ but just... wasn't, because of that backwards compatibility.

I prefer C. I find it more interesting to write code in C than C++; I don't like all these abstractions: namespaces, private and protected variables... all they do is hide from me what's going on. I also don't like OOP, although I've never been able to come up with a good reason for that... I just don't like it. Women complain when people objectify them; I'm fairly sure memory locations feel the same way...

In C I know exactly what's happening because I'm doing it. Plus, nothing rivals C as a systems programming language IMO (and systems programming is what I plan to do).
Last edited on
I agree, but Java is pretty well supported on most major platforms.
http://www.ibiblio.org/java/javafaq.html#xtocid190293
True... but it's still nice to know that you rely only on yourself* for portability, as with AOT compiled languages like Pascal or C or C++.

*and, I suppose, the libraries you use...
LOL wat? Namespaces aren't abstractions, silly! If anything, they're a much saner solution to C's way of handling identifier scopes, which is not doing it.
"Hey, guise! I have this great idea for a function name for our library! read()."

Visibility isn't an abstraction, either.
abstraction: the act of withdrawing or removing something

( http://www.google.co.uk/search?q=define%3A+abstraction )
chrisname wrote:
Women complain when people objectify them; I'm fairly sure memory locations feel the same way...


hahaha... good comparison...

am i allowed to use that citation?^^...
Sorry. That reply wasn't directed at you, Duoas. I was just quoting you to make a point about the language. No offense intended.

C++ is not just one language. There are at least four languages that make up C++: the C preprocessor, the C language itself, the C++ language extensions (namespaces, classes, operator overloading, exceptions, etc) -- and then there is the templating language. All four have an impact on one another. The C preprocessor and the C language do not interfere with the average programmer, except to the extent that it impacts the ways concepts can be expressed in the C++ extensions and in the template language.

Like anything, C++ is a design trade-off. C++ traded off a clean syntax for C compatibility. C++ is extremely useful -- that's why I program in C++. But, as a language, it will never win any beauty contest.
Pages: 12345