Pascal said:
LR said:
Are you implying that his claims can be substantiated? If so, which ones?
I think these are the claims.
1) Experts don't agree.
2) C++ brings complexity that is not needed.
3) Low level programming can be done fine and cleanly with C.
4) [C] (which) is more popular than C++ anyway.
I think 1) is clearly true, perhaps almost self-evident, although, the
word "expert" has not been clearly defined.
I suspect that 2) is not testable, although, I think that C++ has some
features that are useful in attacking complexity.
It's perfectly testable. Just write the same program in C++ and in
another programming language. All I can say here, is that when I
switched to Common Lisp, I got the idea to convert my libraries (not
only C++, but including C++) into lisp, and:
1- only one tenth of the libraries were useful in Lisp,
Only one tenth? Each language has some idiomatic features. I wonder if
you were maintaining C++'s idiom in your translation? Or maybe you
wouldn't want to?
2- of the tenth I eventually translated in Lisp, then ended having
only one tenth of the size.
I'm not that familiar with Lisp, but I'd be curious to know if you
maintained things like being able to provide a type for an array or
Ok, the comparison with Lisp is unfair;
Perhaps. Perhaps not. Depending on what your criteria for unfair
comparisons is.
you can just test it writting
the same programm in C++ and Eiffel, or even in C++ and Objective-C.
What program would you suggest writing? Hello World? A payroll
application? Ecological or economic system modeling?
How would you, in context, define, "complexity", how to "bring
complexity" and decide if it was not needed?
I suggest that none of that is simple. Perhaps it's not doable. Please
see claim 1).
A quick example. Suppose there is an OO language that doesn't support
the concept of dtors. I want to implement a class similar to
std::ifstream in this language. Does the fact that I have to 'manually'
close the file mean that C++ brings complexity that is not needed? Or
does the absence of dtors actually make the code I, as a user of the
language, have to write more complex?
In anycase, popularity can be measured easily enough,
Provided "popularity" is defined first.
and you can come
with reasonable and measurable definitions for "fine" an "cleanly".
Yes, of course you can. But those definitions would have to be provided
by the person making the claim. And of course, once the terms are
defined, the claims can be challenged. Even the validity and usefulness
of the definition in the context of the claims can be challenged.
In the end, I think the claims made do not serve a particularly useful
purpose. Just my opinion. YMMV.
LR