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:
Anonymous2007-02-09 4:26
One word, the forced indentation of code. Thread over.
Name:
Anonymous2007-02-09 4:29
* it's a mis-designed pile of crap
* it's frigging bloated compared to C
* it's error prone and a productivity drain
* it's extremely complicated compared to python and pals
IT'S A SHITTY LANGUAGE FOR PEOPLE WITH NO TASTE. THREAD OVER.
Name:
Anonymous2007-02-09 4:32
even php is better than c++
Name:
Anonymous2007-02-09 4:41
Fan mail to the inventor of C++, Bjarne Stroustrup: HI! My name is Andras and I am currently taking C++. I dont know if it is the incompetence of my teachers and peers OR that C++ sucks ass that I cannot get anything to work. I am quite glad that you nevermade too much money off of it (how i could tell? look on your website and your new balance shoes tell all, speaking of which you should never put your shoes on your desk). Also, your website sucks a lot, just like C++. Also, what use is there of C++? Yippie, I can concatenate strings and make arrays, that by the way I could do a whole lot easier in any other language. The thing that pisses me off the most is that the not all libraries come included in the compilers. So, if i want to use apstring or some other crap, I need to find the libraries and pray to God they work and dont screw over the other libraries. (Oddly enough JavaScript, a not hard language, fixes this by the singular data type: var. thats right! no more int, double, string, vector, or anything else). After studying C++ for almost a year (at an AP level, what ever that crap is worth), I can do nothing fancy: graphics or anything "cool." Well, nice talking to you, too bad you couldnt invent something more lame. Thanks. I hope you feel better after having demonstrated your ignorance and bad manners.
Name:
Anonymous2007-02-09 4:51
- Far too complicated. It's the predecessor of enterprise scalable business best-practice solutions, ideal for Xbox hueg bloatware companies.
- No garbage collector for OO = fail.
- Bloated with far too many features, misfeatures which makes it hell. You end up using C++--, but your C++-- is not somebody else's C++--.
- Shitty standard library.
- Template insanity.
do {
switch(l)
{
case 0:
a = &(*star).x[0];
putchar((char)*a);
l = l + 2;
break;
case 2:
putchar(star->x[1]);
l++;
break;
default:
l = 4;
break;
}
} while(l != 4);
a = (char*)&hi[1];
for(i=0;i<4;i++)
{
putchar((char)*a);
a++;
}
printf("Press a key to continue!\n");
getchar();
return 0;
}
int getasweetassinteger(char a)
{
unsigned char f = 0xE7;
char l = a & f;
return (int)l;
}
Thread over.
Name:
Anonymous2007-02-09 8:16
I think the only reason C++ exists today is templates.
They let you do "generic" stuff, which is powerful, and would be great... Buut they are fucking atrocious, producing recursive compiler errors and the only reason they exist is to cover up the deficiencys of the language.
Name:
Anonymous2007-02-09 8:22
* Idiotic error messages for newbies (with most compilers a single missed semicolon can generate upwards of a hundred errors in a long code block)
* call_by_value instead of call_by_reference
* pointers
* memory leaks
Now I do realize that these points just reek newbie all over the place, but since I am a newbie, this is what bothers me.
Name:
Anonymous2007-02-09 8:52
One word, the forced indentation of code. Thread over.
Their is a fundermental problem with programing right now. Since the C days and C++ days. People have been abstracting the low down interfaces of the hardware and machine language that right now that you have soo many API and technology and design pholophiy you are simply just re-learning the API interface and the arcane design that went into it.
In the old days you could pick up a book on C, and machine language assembly and you had the information to go out and design programs in whatever OS you wanted. Nowadays, the typical programmer is faced with the following programing and API choices.
COM,DCOM,IIS,DLL,Win32,HTTP,XML,WML,Java,C#, ect.. The list simply keeps going on and on.
So whats the point of this, well, the root of the problem is that computer science think of itself as being completly abstracted away from the hardware in every respect and design wonderfull, complex programing languages, API's that only true computer science people will understand. Added with this thought proccess and the un-realistic expectations people have about programs in general is just a receipt for trouble. From this we have so many different layers to consider when in developerment, that simply one life time cannot comp rend or seem to understand all of them! And give a HONEST review about technology unless they have worked in with that technology for years. That being the point no argument is more or less than the other.
What is important, is taking older design concepts and apply them to todays world and you will find that they're work better if not faster than new techniques.
So, Simply put. People bad mouthing C,C++ or older technologys simply are arguing for agrument sake. Its pointless discussion, over and over again. The breadth of technology now'adays cannot simply be sumed up by a 18 year old hot shot.
For myself, I've enjoyed talking to enginners and one of their concerns were exactly that. Programers or CS people think of themselves as beeing special and only they can understand the knowledge of whats happening inside the computer. I know, see why did take a very long time though. I've started to use C++ and win32 more each day and actualy enjoy being closer to the OS and knowing my job and security will be their long before the dot come bubble busts again well everyone try's to learn new languages.
Its all simply fire and motion, once you step back and see it. You will laugh and focus on what is more important in your life than simply bickering about pointless semantics on a computer screen.
Name:
Anonymous2007-02-09 10:45
Their is a fundermental problem with programing right now. .. design pholophiy ..
no, there is a fundamental problem with your spelling. I know, an ad hominem right from the start, but I really do hate your drawn out pile of manure disguised as a post that I actually went out of my way to read to the end. in fact, I'm not even going to bother refuting your reasoning, because it should be ostensibly obvious to any person having the basic faculties of critical thinking that it's bunk and fatiguingly baseless. instead, I'm going to repay you with vitriol and disdain. you are a prat, and you should have no business trying to make arguments anywhere but in a schoolyard to a company of 12 year olds. please rectify this by getting the fuck out, thanks.
Yes I cannot spell, I find it difficult even to constructing paragraphs correctly. Although, this is partly to do with my serious condition I have with dyslexia. Added to that the poor quality of the education system to refuse to help me because I'm in the too difficult basket.
Oh, btw seeing your not going to be refuting my claims above, I'm not really concerned either way. Its simply water under the bridge that I've been in the conversation so often that I'm sic and tied of it.
One word, the forced indentation of code. Thread over.
Name:
Anonymous2007-02-09 13:32
One of C++'s problems is that it has accumulated a lot of cruft.
Take the most powerful feature of C++: templates. Templates were never meant to be (ab)used the way they are now; their power was discovered, not designed. As a result, because backward compatibility cannot be broken, library developers are performing agonizing contortions to make these powerful libraries. SFINAE anyone?
Or take the far more mundane C strings in C++. They're easy to learn and create, but they're dangerous like hell. The proper way is to use the STL string library, but of course that's more to learn and boilerplate suddenly appears in the code. And since it's part of the standard, you can't extend the string class however you want, eg. to properly support unicode. It works most of the time with UTF8, but if you want to proper support, you'll need to make your own string class, probably using vector (<insert snide joke about the C++ community's stupid obsession with libraries instead of language features when these same libraries are frozen by the fucking standard anyway>).
And it goes on. C++ is damn powerful, but it needs a remake. Only problem is if you remake it, it's not longer C++. Me? I'm holding my breath for D, and seeing what Walter Bright and Alexander Alexandrescu can make.
Name:
Anonymous2007-02-09 13:45
The biggest problem with C++ is that new generations of programmers keep on getting dumber. The collective IQ of the industry has dropped so far that the average programmer is now too stupid to figure out something as simple as pointer arithmetic.
Name:
Anonymous2007-02-09 13:49
>>19
Can't you just subclass the string class with some other datatype instead of char?
Name:
Anonymous2007-02-09 13:52
Well, you may be right, >>20, but just remember that the more complicated something is, the more likely even the best developer is to make mistakes. So making a simple and consistent language is to everyone's advantage.
Note that by "simple", I'm not saying "stupid". Java made this mistake, which is why it's so ugly now that the shortcomings are being hacked out.
It's not really a subclass persay as the string gets chars via a template parameter (basic_char or somesuch for the usual std::string if memory server). Importantly, and not mentioned by >>19, the standard library also includes wstrings, which are basically just strings with 2-byte characters.
As far as handling unicode <i>correctly</i>, basically no library that I've heard of does. What with the code points and pages and ability to combine multiple memory-level "characters" into one glyph, it's often even questionable what the definition of a "character" is. Lots of libraries get it mostly right, though, and that's what you've got to go for.
As long as you're not doing anything specialized with the wstring, the standard library ought to suit you just fine. If you're doing specialized work with Unicode strings in nasty languages, though, you're going to have to go buy a library to handle it or write your own. This isn't any different from any other library in any language, of course. Standard libraries are widely useful, but not universally adequate, nor is it even possible that they could be.
The usual std::string is basic_string<char>, not basic_string<basic_char>. std::wstring is basic_string<wchar_t>.
Name:
Anonymous2007-02-09 14:10
Segment faults.
Only if you're a moron who derefences null pointers. Broken standard library.
Example? Broken templates
Example? Far too complicated
LOL noob! No garbage collector for OO = fail.
No garbage collector = fast and control Bloated with far too many features, misfeatures which makes it hell.
Example? Shitty standard library.
Example?
In conclusion: you're all a bunch of fucking noobs who will only discover virtual tables, templates and polymorphism in a hundred years. I rest my case.
Name:
Anonymous2007-02-09 14:23
>>21
Not really necessary. string and wstring are typedefs for basic_string<char> and basic_string<wchar_t> already. Of course, that causes a problem if you're handling UTF8 data in particular, because the length of each codepoint varies. So, now you have to rewrite much (maybe all of it, I haven't looked since I hate looking at STL's guts) of the code anyway, so why bother subclassing?
Also, I got Andrei Alexandrescu's name wrong. Whoops.
Name:
Anonymous2007-02-09 14:33
>>26
The fact that you think that having no garbage collector is "fast and control" indicates that you're just as much a nub. Unless you're allocating everything on stack or writing your own memory handlers and overriding new, it's not deterministic either. When was the last time you looked at the most common heap allocation algorithms?
Anybody who is worth their salt will preallocate before entering a performance-critical section, no matter whether the language uses manual memory handling, automatic, or both.
Name:
Anonymous2007-02-09 14:58
>>28 Anybody who is worth their salt will preallocate before entering a performance-critical section
Yes moron, but with garbage collection, you don't control it! See? "controooooool"
Name:
Anonymous2007-02-09 15:07
One word, the forced indentation of code. Thread over.
Name:
Anonymous2007-02-09 15:25
You guys are morons C++ is far away to be complicated if you think C++ is complicated I wonder what you think of assembler and fortran
Name:
Anonymous2007-02-09 16:05
>>29
That just ain't so, I'm afraid. If you're not allocating, what reason does the GC have to run? Indeed, with most common GC implementations, it's impossible for them to run. Furthermore, many GC languages allow you to disable the GC as well, and all of the hybrids do.
So, as I said, you're also a nub.
Name:
Anonymous2007-02-09 16:11
>>31
Haven't used Fortran, but I can comment on C++ and assembler:
Writing apps in assembler is harder, but C++ is miles and away more complicated. Are you telling me you find mnemonic dest, src complex?
no but things like correcting the stack and other assorted tasks can be difficult when learning
Name:
Anonymous2007-02-09 17:54
>>34
leave
ret
MASM automatically restores regs if its declared with uses. Local variables on stack get handled automatically to, if declared with LOCAL.
But the one thing about asm is one word, the forced indentation of code. Thread over.
Name:
Anonymous2007-02-09 18:00
One word, the voluntary indentation of code. Thread over.
>>67
I think I might agree, but development has to be done somehow. What's a better language (that has libraries available that allow you to actually do something)?
Name:
Anonymous2007-08-10 14:41 ID:AwCtHnEL
>>70
Almost anything? The library thing may place some constraints, but let's sstart with Python.
Name:
Anonymous2007-08-10 14:53 ID:fvGEydHY
>>71
ONE WORD, FORCED INDENTATION OF THE CODE, THREAD OVER
Name:
Anonymous2007-08-10 15:38 ID:NDrVkL5M
C# IS THE SUCCESSOR TO C++ AT LEAST UNTIL THE NEXT VERSION OF C++ IS RELEASED AND C# WILL BE EVEN BETTER BY THEN ANYWAY.
ONLY REASON TO USE C++ IS FOR SPEED. THREAD OVER.
sorry for the caps.
(((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for(expt 3 88888000)years longer than you) (ive read sicp twice) (i know every programming language in the world including apl) (if u wanna batl(lets do it)) (ill crush you like a bean))
Name:
Anonymous2007-08-11 22:28 ID:f/GUQHgr
"C++ fails at speed of development for anything serious."
If I wanted to develop something serious, I certainly won't use some JIT or interpreted language that runs like shit.
Name:
Anonymous2007-08-11 22:40 ID:Zqgwr+hg
>>75
Good for you. I would though, because such languages let me get a project done much sooner, make maintenance easier, and have fewer bugs. Portability is often easier too, if that matters.
And by rewriting a few speed-critical sections in C or assembly I can still come within spitting distance of C++'s performance. lulz
Name:
Anonymous2007-08-12 0:00 ID:NXjI7I7Z
I get speed of development and speed of execution from sbcl, bitches.
Name:
Anonymous2007-08-12 0:34 ID:bxdEMFss
I LISTEN TO INFECTED MUSHROOM WHILE I WRITE JAVA BECAUSE I AM 1337
Name:
Anonymous2007-08-12 0:35 ID:xoBoUzRt
>>77
And you even get a way to use up all the parens you might have lying around.
Name:
Anonymous2007-08-12 13:18 ID:+vh0PQgM
>>31
1 WRITE (*,6)
FORMAT ('FORTRAN IS EASY BALLSFACE' /)
7 END
...and they had forced indention way before it was cool.
Name:
Anonymous2007-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).
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
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:
Anonymous2007-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.
>>86
Same could be said about anything else.. really, people like to complain, it's normal, deal with it.
Name:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-08-12 17:19 ID:LfbbaCw8
>>90
Each to their own I guess, but I find template metaprogramming incredably useful.
template metaprogramming is useful, but it is an horrible way to do metaprogramming.
Name:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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:
Anonymous2007-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.
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 :/
>>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.)
>>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.
Name:
Anonymous2007-08-14 11:13 ID:LEnykHYZ
>>120 OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN>>19,24
Name:
Anonymous2007-08-14 11:28 ID:xzyNtOV6
WHY WOULD A GC KNOW WHEN THIS TIME IS BETTER THAN YOU?
A lot of GCs never run unless you attempt to allocate more memory than is left available. That and you can disable the GC.
GCs will become even more of a win as concurrency takes hold.
Name:
Anonymous2007-08-14 12:30 ID:IyjU1Dua
>>122
So in other words, you have no control over when the gc executes?
If you are working with a project with rather large ammounts of data that needs to be moved, executed or computed and you have a limmited ammount of memory, a gc could acually ruin your whole project, since it would have no idea of what data to 'free up', and might thus free up a hunk of memory that was in use, or had some other purpos.
You can of course write your program with the GC's in mind, but that would generaly slow the program down.
But in the end of course it depends on what you're doing..
Name:
Anonymous2007-08-14 16:58 ID:x1gweIU+
>>120 (((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for(expt 3 88888000)years longer than you) (ive read sicp twice) (i know every programming language in the world including apl) (if u wanna batl(lets do it)) (ill crush you like a bean))
Name:
Anonymous2007-08-14 22:50 ID:xzyNtOV6
>>123 So in other words, you have no control over when the gc executes?
If you reread what I wrote in >122 again (carefully), you'll see that I was saying you do.
Well, some languages don't, but then some languages don't have closures either.
a gc could acually ruin your whole project, since it would have no idea of what data to 'free up'
Ouch. Please read >>129. You have misunderstood what garbage collection is.
tl;dr: in most languages that's impossible, but if the languages has pointers and you're doing the pointer XOR trick it can.
You can of course write your program with the GC's in mind, but that would generaly slow the program down.
Pardon? The same rule that applies for manual memory management applies to most common garbage collectors: don't allocate in speed-critical sections. The only difference is you don't need to worry about cleaning up memory after yourself, since the GC does it for you.
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy