You can replace C++ with almost any other mainstream language in the above paragraph and it would still hold true. Problem is, contemporary general-purpose languages are used for such a wide range of different tasks that it is simply impossible for them not to be complex (syntactically or in terms of runtime envoronment). And yes you can hide complexity behind abstractions (which our programming languages successfully do), but you cannot really eliminate it.
And despite all that I see more real-world applications written in "horrible" languages like C++ or Java than in "elegant" languages like Common Lisp.
I can write Java code that will not surprise me with unexpected copies, contain huge memory problems (GC does have edge cases, but if you throw that in I will throw in "non-trivial memory management in C++ when 'just use a smart pointer' doesn't work" and you don't come out ahead at all), or surprise me greatly with the memory model. It doesn't have a huge syntax, and the language doesn't get 50% bigger on every release of the syntax. Many Java programmers can answer questions that go quite deep into how Java works.
I don't like or use Java, and it isn't perfect by any means. My point is just how far I didn't have to go down the list of "mainstream languages" before your claim is completely false. C++ is an outlier.
C also has the memory leaking issue, but the rest is false as well. Though in the memory model case it's by virtue of not having one.
And that's sticking with a very generous-for-you interpretation of "mainstream". If I'm allowed to dip down to Python or something you're even worse off.
All I can say is, I can write C++ code that will not surprise me with unexpected copies, contain huge memory problems, or surprise me greatly with the memory model.Stop whining and learn to use your tools, goddamit.
Comments
You can replace C++ with almost any other mainstream language in the above paragraph and it would still hold true. Problem is, contemporary general-purpose languages are used for such a wide range of different tasks that it is simply impossible for them not to be complex (syntactically or in terms of runtime envoronment). And yes you can hide complexity behind abstractions (which our programming languages successfully do), but you cannot really eliminate it. And despite all that I see more real-world applications written in "horrible" languages like C++ or Java than in "elegant" languages like Common Lisp.
I can write Java code that will not surprise me with unexpected copies, contain huge memory problems (GC does have edge cases, but if you throw that in I will throw in "non-trivial memory management in C++ when 'just use a smart pointer' doesn't work" and you don't come out ahead at all), or surprise me greatly with the memory model. It doesn't have a huge syntax, and the language doesn't get 50% bigger on every release of the syntax. Many Java programmers can answer questions that go quite deep into how Java works.
I don't like or use Java, and it isn't perfect by any means. My point is just how far I didn't have to go down the list of "mainstream languages" before your claim is completely false. C++ is an outlier.
C also has the memory leaking issue, but the rest is false as well. Though in the memory model case it's by virtue of not having one.
And that's sticking with a very generous-for-you interpretation of "mainstream". If I'm allowed to dip down to Python or something you're even worse off.
All I can say is, I can write C++ code that will not surprise me with unexpected copies, contain huge memory problems, or surprise me greatly with the memory model.Stop whining and learn to use your tools, goddamit.