Q:

Why is C++ known as 'premature optimizaton'?

"Programming in C++ is premature optimization"
Why does everyone do some people say this?

A:

People often say this (somewhat tongue-in-cheek, in my experience) as a dig against C++ as a choice of language.  People typically choose C++ because it is, in most cases, faster than an alternative like Python or Java.  However, most of the time, the additional speed gained is not really needed.  When a person says "Programming in C++ is premature optimization" they are saying that you could have programmed your application in some other language, been done much faster, then if you needed to make some part of your code really fast, you could simply code that part in C++ and call that routine from the other language.

A:

Because they don't know how to program in C++.
Generally speaking, such people simply don't understand how to program safely (and quickly) in C++ and suggest that doing so takes up an inordinate amount of time or somesuch rubbish. If it really was significantly slower, then people would only do it to make their programs run faster, as C++ is easily the fastest mainstream language. That would make it an optimization- "I'd rather program in C#, but I have to use C++ because it's faster.", and usually premature because most optimizations are.
However, this is usually ignorant. C++ hasn't been a hassle to program in since shared_ptr and std::vector were invented.
Edit: Sorry, I wasn't sufficiently clear. I forget when speaking to non-C++'ers how little they generally know about the language, as I usually just stick in the C++ channel on SO. First, shared_ptr is hardly the only smart pointer, I use unique_ptr a lot more often, and Boost has more. Second, garbage collection is nothing like shared_ptr. Try to garbage collect GPU memory, or a file handle, or a database connection, or an HWND. Good luck. Third, the customizability of shared_ptr is vastly above what you can get from a garbage collected system. Recently, I replaced my memory allocations with a memory arena allocator that I wrote myself. It was like, a hundred lines of code and an hour to test. But I didn't have to re-write a single line of my shared_ptr code, because I just dropped in a custom deleter and it just worked. Try replacing your allocator or inventing a new smart pointer in C# or Java and tell me how long that takes. Oh wait, if you look at using, then even special language power can't make another kind of resource management work in C#. If garbage collection doesn't suit your needs, then you're screwed. That's not my definition of a higher-level language.
Now, I'll be the first to admit that I'm not on the cutting edge of languages like Python, Java, or C#. But as far as I know, Java and C# have nothing as strong as templates. Java's generics are hardly good for anything, and C#'s aren't that much better. For example, I use an expression template to automatically generate a finite state machine. I've never seen anything like that. If I was coding in Java, I'd have to code it manually.

A:

Well, that's because programming in C++ does not magically give you any performance boost over, for example, Java. You need to do it very well, and doing that in C++ is definitely not an easy task. Also time consuming and programmer's time is not cheap...

