Are you fucking retarded? Or actively trying to fuck people?
C++ is an annoying language. It’s right there in the name: C++. It means “Take whatever C is, return that, then add one to C afterwards”. That has to be the most complex process on the face of the earth. The big problem is that it’s all side-effect. It typifies C++ — All side effect. Somehow, despite all the fancy that C++ brings with it, we’re still stuck in this old-world times.
Here is the stuff I hate about C++. But first, I’m going to have to whinge about how Microsoft deal with C++ specifically, because it really covers a huge amount of my gripes. Microsoft. Dear fucking god they annoy me:
- Their documentation is made of fail, compiled using msfail, and deployed to a fail system. Seriously, why is a method for a class on a whole separate page to the class itself? And why is it that some of the parameters are links which take me to what those objects are, and some of them are plain text, meaning I have to do a search (which is shit) to find what object you’re talking about? I thought javadoc was shit but this is a whole new layer of hell.
- Their documentation is made of fail. I need to say this twice it’s that bad. They’ll stick their docs for all languages since the dinosaurs in the same friggin place. I don’t want a bitmap for .NET. I want one for C++. Why not just show me how it’s done in C++? I don’t really give a shit that there’s this really neato library for F#. I understand that you could probably instantiate it in C++, but I don’t want to rely on the kitchen sink here, especially when I just want the normal shit. Also, why are you still listing in your kocher docs stuff that is clearly from windows 1.0 days? It’s time to deprecate it and shove it in documentation for old people... That documentation should stress the fact that they are old.
- Their documentation is made of fail. This is really more broadly the software, though. Why have an option for switching something and then say “DO NOT CHANGE THIS VALUE”. Why have it there? Are you fucking retarded? Or actively trying to fuck people?
- OO, anyone? Some of their classes use proper OO techniques, although I don’t know any so far that use modern stuff like namespaces. It’s a crazy mish-mash of just calling shit and then calling a method on it and then passing it in as a parameter to another thing which really should have been a method.
- Indirection. I want to stress that this is coming from someone who uses Java. Having to get your factory from another factory is not OK, especially considering that there’s only one conceivable implementation coming from you guys.
- Why does your shit still not support spaces in file names and folders? What the fuck is wrong with you?
- Standards. I’m glad you at least have the std stuff in there, but would it be too hard to actually use that shit? Why am I converting from the standard vector to your vector?
- OUT params. Parameters are for telling the function something. That is all. Don’t make me give you a pointer which you’ll populate. Just return the fucking thing.
- Return codes. Every line of microsoft code is: HEY_I_ACTUALLY_WANT_YOU_TO _THROW_AN_EXCEPTION_IF_SOMETHING_IS_WRONG(obj->explode()); Why? Why couldn’t the fucking object throw its own exception? Status codes are the devil and the second biggest cause of fail next to buffer overruns.
- You have 12 different types of strings. This is too many. There’s also no utility functions to convert between them, so I have to know about the internal workings of all of your strings.
- Smart pointers. MS smart pointers are retarded. I still have no idea how they work or are supposed to work. And why do all the classes know they’re being managed by these pointers? Why not use the standard ones?
Let’s pause and return to whinging about C++ more generally...
- virtual destructors. I practically need to declare a destructor virtual or C++ will fuck my program. It’s just a hoop for no reason.
- Copy constructors. Almost every class needs syntax which stops them from existing.
- Implicit conversion. Why is the default set to “explode the universe” as opposed to “what the developer actually wants”?
- C compatibility. I love C. I don’t love C when it’s in a C++ program.
- Side-effects. At least feel humiliated by them.
- People who think they are smarter than they are. I know this is not C++'s fault specifically, but we need to end those guys.
- [new] Inheritance. When you develop something like inheritance, leaving a big fat hole when you pass-by-value is inexcusable. May as well have made pass-by-value illegal.
- [new] Forward Declaration and order of definition. C does this because function declarations are simple. Class declarations are large and painful. Silly for a modern compiler to have to rely on the location of your code from top to bottom.
- [new] Header files being separate to the implementation files would seem like a good idea but really they’re not. There’s a whole “private� chunk right there — part of the interface is the amount of memory an object will take. You can use a pImpl idiom but, like a real pimple, it’s annoying and grotesque.
- [new] “this” is a pointer. Why is it not a reference, considering the language really encourages references, and any non-reference things you do with “thisâ€� are not allowed (or shouldn’t be) anyway.
- [new] I want to use const, but where the hell do I put it?
- [new] Compile time polymorphism. If you’re going to make your templating language so powerful, you shouldn’t immediately make it feel limited by the fact that the system can’t dynamically figure out which class you’re using to call a function (see double dispatch).
Wow that list is remarkably short compared to the MS specific gripes.