I feel like a lot of discussion on this topic was set off by Linus Torvalds about 13 years when he wrote some famous screed about why the Linux kernel was C
, and his main reason seemed to be that he thinks programmers that can write C++ but are unwilling to conform to plain C are shitty programmers, so a personnel filter based on his opinion of the existing pool of talent. (A selection bias, since more people know C++, but people who use dedicated C often are more specialized?) Even that reason is kinda dumb to me, but the rest of his reasoning is a bit dubious/outdated too, IMO, but based on some bad experiences he'd has a long time ago.
For a more useful and a bit more recent opinion on the subject, I'd actually recommend some of the lectures given by Mike Acton, who is a very high-performance oriented programmer working in games for a long time, and he used to advocate working in mostly assembly well into the PS3 era. Well, guess what, he now uses C++ primarily and has given some great talks on how to write high performance C++ code
. He's not ideological about any of it, he tries things and analyzes the problem and goes with what works, and currently he thinks C++ is the most practical thing to use for games. (And I'm sure he'd use something different if he thought it was better.)
If you're wondering why we don't have a C++ compiler for NES (yet
), it has nothing to do with efficiency, just complexity. It's hard to write a C++ compiler. It's a lot easier to write a C compiler; it's a tiny language by comparison. CC65 being a hobbyist and unpaid work keeps its goals small enough to achieve.
I looked for Windows C related stuff, but I couldn't find anything; only Visual Studio C++.
Most (or maybe all) C++ compiler toolchains include a C compiler somewhere. In the case of Visual Studio, it will compile .cpp or .cc files with its C++ compiler, and .c files with its C compiler. There a bunch of other compiler sets you can use for Windows if you like (clang/LLVM, MinGW, etc.) and they all can do C as well.
Maybe I'm missing something, but shouldn't there be no difference between something between a program written in C vs. one written in C++ but with no C++ specific features?
Yes, this is mostly true. Some would like to argue that you're not actually writing C++ if you're doing that, but I think this is not a useful hair to split. Not all C++ features are bad
or whatever. You can create problems for yourself in any language, and C++'s complexity gives you quite a lot of rope to hang yourself with, but it's a perfectly good language for high performance and/or maintainable code. If you want to take the time to learn how to use it efficiently, there's tons of features of C++ that can be used well that are completely alien to C.
I have not heard a single good thing about C++ and have fallen under the impression whatever tweaks that were introduced by it ruined everything else.
I'm under the impression that it's one of the most widely used and practical languages, especially for high performance work like game programming. There are endless things to complain about, but I think it's perfectly fine to use for a lot of applications, and tons of software comes out every day proving this.
Also, you're asking on a forum oriented towards writing in assembly for 35 year old hardware, so there's probably a strong bias here... not that a bias is bad, you should probably try to gather knowledge specific to the domain you want to work in.
FWIW I think C is a pretty good language too, but honestly if the choice was up to me at this point I think I'd only use it over C++ because C++ was unavailable (like on the NES), or because it was continuing a project that was already started in C. In professional situations it's usually a moot argument anyway, because the choice of language is forced on you. If it's for a personal project, you should use the language you think would be best for that project's goals. If the goal of the project is learning, it can be very worth picking a language you're unfamiliar with.
If you're asking which ones to learn, I'd say learn both. (I actually learned C++ before C, but this was largely due to what books I had easy access to before the internet existed. Most of the examples I learned from were old examples written in C, though, so once I learned C I wrote only in it for a few years, even though I could have used C++.) Most of what you'll learn about C applies to C++ as well. Less so vice-versa.