Unfortunately most users can't always afford top-end PCs.
Then they certainly can't afford to buy optimized software either. How much do you think it would have cost to halve the minimum requirements for (say) Half-life 2. Another 10 million? Think they would've gotten another million or so sales (or however many they would have had to sell to break even) from doing that? I doubt it. I think most people figured that since they didn't absolutely need it, they'd wait, and buy it when there was a compelling reason to upgrade their computer anyway. Who says they don't? If given a choice between a game that runs and plays great for $50, and a game that runs and plays horrible for $10, I'd choose the $50 game.
Sure. So would I. I would've bought ShadowRun sight unseen if it had run on my Computer (never mind my OS). However do you think Microsoft/Fasa can justify to their shareholders, spending another 6 months optimizing the game to get that kind of additional sales? No - of course not. Because they know (like I know) that:a) If I was a hardcore gamer on a budget I would've bought the XBox360 version.
b) In 2 or 3 years time, I'll have a more powerful computer (and Vista) and ShadowRun will be re-released on a budget label, or bundled with my mouse or something, and I can get it then.
The point made here is that (regardless of programming language) many developers fail to optimize portions of their code that they normally should "instinctually" know will be a bottleneck.
And I'm saying it's ludicrous to claim that programmers intentionally write rubbish code! Maybe everyone I know is just a natural born programmer (which I seriously doubt)?Who are these mystery people you are referring to?
A compiler-level optimization isn't useless though.
Depends on the target platform. On a VLIW processor, no. On a modern CISC/RISC processor 90% of all optimization is done on-die anyway, so the effect of any (real or imagined) compiler optimization is trivial at best, particularly so if the programmer is already doing "instinctive" optimizations. For example, comparing the speed difference between an identical C++ and Python program, will demonstrate this point well.
Depends on the program. Since the most widely used Python interpreter is written in C, I doubt the speed difference is as profound as you suggest for any benchmark not specifically written to be favorable to C++. Either that or you strongly believe that there's some evil nature to the C++ language that inherently introduces bugs into your software.
Yes. And Tim Sweeney, who is probably one of the top ten C++ programmers in the world thinks so too. Did you not read the presentation linked up above? 50% of the bugs in the Unreal Engine are bugs, caused by shortcomings of C++. Yes. The use of C++ to develop software does increase "accidental" (as opposed to inherent) complexity in software, which then results in more bugs. Yes the skill of a programmer (or the application of techniques like pair-programming) can compensate for a lot of accidental complexity, but it seems somewhat of a wasted effort, when the effort could be spent further improving productivity, rather than fighting complexities inherent in the language, and instead focusing on the problem that needs solving. but every programmer should know that it's the logic bugs that really cause problems.
Is it? I don't know that. Logic bugs are found by writing good unit tests. Good unit tests will prevent 90% logic bugs, and 100% regression bugs. The bugs that really cause problems (with C++ programs) are rogue pointers and concurrent access to shared data, and they are almost impossible to track down.