Wow such hatred towards C++

Started by
21 comments, last by Sneftel 14 years, 4 months ago
Quote:Original post by Concentrate
What do you guys think about his comment : Linus

I ask because you guys are more knowledgeable(i.e more experienced).


Wow, he's right on the money. I encourage everyone to read his reasons, rather than just assuming that he has some blind hate for C++. And keep in mind that he's really an OS developer, not a game developer. I prefer straight C for many of the same reasons as he does, but for apps that deal with lots of objects (such as games), C++ can make sense to use instead. However, a competent C programmer can do everything that you can do in C++ without much more effort, and the resulting code tends to be easier to optimize for speed and memory.

Programming is one of those things where there is no single "right" answer. It's an interesting mix of science and art. Lots of people will ramble on about "proper design", OOP languages being the answer to everything, and so on. Lots of people also write crappy bloatware code that I want nothing to do with. The quality of modern software is rather horrible, and I blame lazy and/or incompetent programmers, and companies that have so much bureaucracy that real programmers can't do good work.

An experienced programmer knows more than one language, will select the right one for the job, and will break the design "rules" and do things unconventionally when it makes sense to do so. For example, someone who gets offended by the very mention of a "goto" statement is someone that you probably shouldn't take very seriously... While I happen to agree that you should usually avoid them, they definitely do have a time and a place. Preferences are good and fine, but blind hate against such things is indicative of someone who is intellectually blind. The same goes for blind hate against a language, just as it does for blind support for it.

Learn a few languages, learn them well enough to really understand them and use them, and choose the one that is most natural for your project. I share Linus' frustrations with having to deal with things getting screwed up by people who "know" C++ (or in my case, Java) but don't really know how to program, so they just make a mess of things, and often choose a poorly suited language for what they're doing.
Advertisement
You'll always have people on both sides of the fence, as this argument isn't exactly a new one. A good open-minded programmer familiar with the C family of languages knows that there are times to use one over the other. Generally, the closer you get to the hardware, the more you should be using C, and visa-versa.
Let's not.

This topic is closed to new replies.

Advertisement