Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Bad things about C++

Name: Anonymous 2007-02-09 4:03

Since the python thread was a smashing success, it's only logical to have a C++ equivalent. So list the bad things about C++. Constructive thread, please. I will get the ball rolling:

 * Segment faults.
 * Broken standard library.
 * One word, the forced indentation of code. Thread over.
 * Broken templates.

Name: Anonymous 2007-08-12 14:07 ID:LfbbaCw8

All of these complaints about c++ seem to boil down to "c++ is hard" or "my c++ compiler is shit". Features such as templates, operator overloading, no garbage collection, no complex base types as part of the language (string etc.) are what make the language good.

Saying that, there are plenty of things about the language which suck, like the standard library (exclusing most of the stl).

c++ is fucking simple.

Name: Anonymous 2007-08-12 14:18 ID:UlMyzED8

>>81

Thank you, all other posters are retards, except maybe the complaint about bloat over C.  For everyone else here are some steps to help with C/C++
- Learn to program for real, not Python etc.
- Learn to use GNu C Compiler
- STFU

Name: Anonymous 2007-08-12 14:26 ID:Heaven

>>81,82

C++ is not simple, C++ is a huge language full of nonsense bullshit.

If you consider C++ simple i'd like to hear what language you consider complex.

As for me, a simple "language" would be x86 assembly, or lisp.
These are SIMPLE languages. C++ is full of nonsense bullshit.

I've met very few people that actually know C++.
Anyone who says that C++ is simple does not know C++.

Name: Anonymous 2007-08-12 14:30 ID:QQ39tQZ2

>>83
lol u n00b programmer u can just do inline assembler in C++

Name: Anonymous 2007-08-12 14:35 ID:Heaven

>>84
that doesn't fucking make C++ simple does it
fucking sage
you're all fucking trolls

Name: Bjarne Stroustrup 2007-08-12 14:38 ID:Heaven

There are just two kinds of languages: the ones everybody complains about and the ones nobody uses.

Name: Anonymous 2007-08-12 14:49 ID:UlMyzED8

>>83

Languages worse than C++:
Motif UIL, SPARC assembly, brainfuck, JOVIAL(Just because I hate it) and of course Perl6 ;)

Also I think complexity is relative.  Yes x86 asm has less commands than C++, but it's a shitload harder to do anything worthwhile in it.  If we are talking about just nonsense added in for the sake of being pointless then you are describing JAVA(Swing and the other fifty bajillion standard libraries).

I'm mainly pissed about people bitching about pointers and preprocessors, these should be considered basics.  I will concede that the OOP in C++ is a kludge at best.

Name: Anonymous 2007-08-12 14:52 ID:LfbbaCw8

>>83
What do you consider to be complex and nonsensical about c++? Since you know asm it can't be the lower level things like pointer and memory allocation/management, OO is present it many languages, its just templates, operator overloading, multiple inheritance and things like virtual functions (which other languages do implicitly anyway) which make the language unique. I'll agree that the standard library is shit (imho anyway) and perhaps nonesensical but it's not like you have to use it, just use the C standard library. Theres not a huge amount of the language that isn't present in other languages in some form.

Name: Anonymous 2007-08-12 15:17 ID:Heaven

>>86
Same could be said about anything else.. really, people like to complain, it's normal, deal with it.

Name: Anonymous 2007-08-12 15:44 ID:8ezqyssb

Features such as templates, operator overloading, no garbage collection, no complex base types as part of the language (string etc.) are what make the language good.
With the exclusion of operator overloading, the above is a list of abject language failure. While I can even overlook templates, template metaprogramming is glaring evidence how utterly fucked up and weak C++ really it.

I've become convinced that anybody arguing in favour of C++ as a language is an ignorant masochist. About the only thing I can say in favour of C++ is that it has deterministic finalization and multiple inheritance.

Name: Anonymous 2007-08-12 15:54 ID:UlMyzED8

>>90
It depends on what you 'grew up' with.  I personally hate the hand holding of languages like JAVA with regards to garbage collection and base types.  Also shit like bounds protection really irks me, since it's adding extra overhead for no real gain.  You may argue that this saves you from missed problems, but in a real development situation your code should always be peer reviewed to avoid basic problems like this, instead of relying on the implementation to save your ass.  The overhead inherit in loading every freakin type, collecting garbage, and dynamic bounds checking is completely unacceptable for many applications.

Name: Anonymous 2007-08-12 16:39 ID:8ezqyssb

>>91
Yeah, well, I grew up with assembly and C. Been there, done that, for almost a decade. I saw C++ grow up, and can recite to you a story about most of the compilers.

Despite where I came from, C++ is still a terrible language.

And Java is a piece of shit too. That doesn't excuse C++ for anything. However, I think your argument is completely off: you should rely on an implementation to save your ass so you can worry about things other that utterly retarded minutiae... for what?

That's like arguing functions are bad. Let's go back to writing stack frames.

Name: Anonymous 2007-08-12 16:45 ID:eTiz6b0K

>>91
And then again, 'many applications' can quite stand the neglible overhead of checking a fucking array bound now and then. Debugging a crash with "Error: ArrayBoundsError foomodule(233)" is a lot quicker than finding the source of randomly corrupted data, and that sort of thing sneaks in no matter how much you peer review. And then you optionally turn it off when compiling the release version (though why bother?).

C++ developers often seem to mistake complexity for power. I think it's a result of having to focus so much on the language while learning it that they can't solve problems language-agnostically.

"Fuck, these languages suck. They don't have any of the 'advanced' features my language was forced to add to work around it's own inherent limitations."

Name: Anonymous 2007-08-12 17:19 ID:LfbbaCw8

>>90
Each to their own I guess, but I find template metaprogramming incredably useful.

Name: Anonymous 2007-08-12 18:49 ID:D2mRpyt/

>>94
incredibly

Name: Anonymous 2007-08-12 19:00 ID:Heaven

[b]__________[b]
INCREDIBLY

Name: Anonymous 2007-08-12 19:01 ID:Heaven

>>96
fail

Name: Anonymous 2007-08-12 19:02 ID:Heaven

>>96

__________
[b][u]INCREDIBLY[/b][/u]

Name: Anonymous 2007-08-12 19:03 ID:Heaven

>>98

__________
INCREDIBLY

Name: Anonymous 2007-08-12 19:04 ID:Heaven

>>99

____________
INCREDIBLY

Name: Anonymous 2007-08-12 19:05 ID:Heaven

>>98,99
just go and end yourselves

Name: Anonymous 2007-08-12 19:06 ID:Heaven

>>100
please die

Name: Anonymous 2007-08-12 19:07 ID:D2mRpyt/

I COMMAND YOU TO DIE IN THE NAME OF FORD

Name: Anonymous 2007-08-12 19:09 ID:D9NUPMCM

>>96-102

Pame serson

Name: Anonymous 2007-08-12 19:11 ID:Heaven

>>104
fucking sit on a spike

Name: Anonymous 2007-08-12 19:28 ID:nO2vYPDu

- compiles into a steaming pile of shit

assembler 4 lyfe

Name: Anonymous 2007-08-12 21:42 ID:2lJkYmkH

template metaprogramming is useful, but it is an horrible way to do metaprogramming.

Name: Anonymous 2007-08-12 22:04 ID:8ezqyssb

>>94
Each to their own I guess, but I find template metaprogramming incredably useful.
Indeed. You're stuck with a poor language, and need to get something done. However, in a decent language you wouldn't need template metaprogamming in the first place.

Template metaprogramming has the following three problems:
a) It indicates just how weak the non-templating part is (what most people call C++).
b) Template metaprogramming and "normal" programming are wildly different. By any sane standard, they are not the same language at all.
c) The metaprogramming part is a horrible and poorly designed functional language. Templates were never meant to be abused this way. SFINAE anyone?

I think of template metaprogramming the same way I think of the C preprocessor: if you're allowed multiple passes C macros are actually Turing complete, but all sane -- and most insane -- developers will say "fuck that" and move on to using a better tool.

You're welcome to continue using C++, but you're wasting your life and developer vitality. If you don't burn out, you'll still eventually realize that developers with other tools have left you in the dust, and had fun the entire time.

Name: Anonymous 2007-08-12 22:13 ID:SsS+js2N

>>108
I think templates are pretty much just there for the standard template library. In any application you make on your own, you're almost always better off just forgetting about templates, but developers are getting tired of having to implement things like linked lists on their own.

Name: Anonymous 2007-08-12 22:50 ID:8ezqyssb

>>109
Oh, I quite concur, except that means that you've missed out on many powerful means of abstraction. Strip template metaprogramming away and take a look at what's left of C++...

Here's the problem: normal C++ is anemic. You need template metaprogramming to prop it up. Template metaprogramming is different and horrible. So you're left with normal C++. Which is still weak.

Whoops.

Sane languages do not have this problem. All the power is right there, wherever you want, whenever you want, with a short syntax and fairly clean semantics. There is no arbitrary division in the language which separates the programming hoi polloi from the masochistic gatekeepers of their private functional hell.

Name: Anonymous 2007-08-13 6:29 ID:lYog3p3D

You guys probably won't believe me, but I actually started this thread months ago, shortly after I invented the ``forced indentation'' meme.

Name: Anonymous 2007-08-13 21:03 ID:Heaven

>>111
well duh. Who else posts here, anon?

Name: Anonymous 2007-08-14 5:56 ID:PoQB/CAz

To all those fags complaining about c... You are not forced to use C... Go use some other language or develop your own one if you have that much complaints :/

Name: Anonymous 2007-08-14 6:02 ID:Heaven

>>113
C sucks, deal with it.

Name: Anonymous 2007-08-14 6:45 ID:Heaven

ITT WE ARE ANGRY WAAAAAAAAARGRAHGRHARHAAARAHGRHGARAHRARHR

Name: Anonymous 2007-08-14 9:29 ID:wx2Po+50

FUCKHEADS

STOP WHINING ABOUT AUTOMATIC FUCKING GARBAGE COLLECTION

~class() { delete [] WHATEVER };

DESTRUCTIONS AND RRID BITCH DO YOU USE IT

DO THIS
NO PROBLEMS
STFU

Name: Anonymous 2007-08-14 9:39 ID:Heaven

>>116
But GC is faster! Same as with ASM, most of the time a good compiler will generate better code then you.

Name: Anonymous 2007-08-14 9:45 ID:Heaven

>>17
Same as with ASM, most of the time a good compiler will generate better code then you.
Haha, bullshit.
i can beat gcc with -O2 anytime (for small to medium C codes. i can't write a whole fucking project in assembly.)

Name: Anonymous 2007-08-14 9:55 ID:Heaven

>>118
that's why gcc beats you fucktard.

Name: Anonymous 2007-08-14 10:58 ID:lJiY5A8i

>>117
IT IS NOT FASTER, IT ONLY SHIFTS THE DELAY IN MEMORY REALLOCATION TO A LATER TIME.  BUY NOW PAY LATER.  TOTAL TIME SAVED = 0 SECONDS.

IF YOU DON'T WANT TO INCUR THE TIME PENALTY OF DEALLOCATION THEN DON'T DEALLOCATE THE STUFF UNTIL YOU ARE READY.  WHY WOULD A GC KNOW WHEN THIS TIME IS BETTER THAN YOU?

I'D EVEN SAY SCREW SCOPES AND DO IT ULTRA-MANUALLY WITHOUT RELYING ON THINGS GOING OUT OF SCOPE TO DECIDE FOR YOU WHEN YOU NEED TO GC LIKE SOME JAVA NAZI.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List