This is a quote from the Gamedev.net forums by a user named ApochPiQ about C++. I found it amusing:

Don’t be seduced by the apparent “easiness” of C++ and how fast you can get sort-of-working code written, especially coming from syntactically related languages like Java. It may only take a few days (or even hours) to get a simple program done, and once you’ve gotten that far, it’s painfully tempting to go “hey, I know C++ now, that wasn’t so bad!”

I wince every time I read someone’s personal story where they “learned” C++ in a matter of days/weeks/even months, and then go on to talk about how easy it is and how they don’t understand why people warn against it.

This is why C++ is hard. I know people who have been using C++ for years who can’t answer those quizzes. I know I can’t guarantee that I’d get every question right on the first try, at least not just off the top of my head. And those quizzes just barely scratch the surface of the complexity and difficulty that C++ can present.

There is a vast gulf between “hello world” and a 3D game engine. You can write small, simple, perfectly legal C++ programs forever without running into an issue, and therefore feel justified in your belief that you “know” C++ and can avoid all the dangers of large-scale software development in the language. Then you write something that’s actually large, and suddenly it crashes or leaks memory or does all manner of unspeakable evil and you can’t tell why – because you never actually knew C++ to begin with.

I don’t want to sound like the grouchy old guy who overhypes the dangers of crossing the street; if this sounds hyperbolic or exaggerated, consider carefully that it’s not. I’m being deadly serious here. C++ is an immensely powerful tool, but like most powerful tools, it is very easy to use incorrectly. Worse, you can use it incorrectly for years and not know it, until finally you cross that invisible threshold of complexity and the whole thing blows up in your face.

It’s kind of like people who accidentally shoot themselves in the head while cleaning their guns. You can look down the barrel of an empty gun and pull the trigger, and live; you might even get lucky enough to do that thousands of times. But if you don’t understand that this is a bad idea, and that you’re taking a serious risk by doing it, you will eventually splatter your brains all over the place.

The tragedy of beginners learning C++ is that most of them don’t understand why they shouldn’t look down the barrel to begin with. After all, it only ever goes “click” when you do that, right?

- ApochPiQ

Forum post: Link

«