J
Joshua Maurice
Joshua Maurice said:C++ is not Java. C++'s stated primary design goals
include
- runtime performance comparable with assembly
For most programs, we don't care about the speed.
- don't pay for what you don't use
I wish you'd paid for the uncaught bugs left in executables that
affect the users.
[...]
- easy to write code / programmer productivity (with less relative
emphasis on this one IMHO)
Programmers would be more productive if the implementations helped to
catch bugs at run-time.
I full heartily agree that current C++ compilers make me sad. They
make me sad for lack of standard compliance (some recent versions of
MSVC don't support covariant return types with multiple inheritance,
all compilers have bugs:
http://www.cs.utah.edu/~regehr/papers/emsoft08-preprint.pdf
etc.) and lack of developer-focused tools. I would very much want
every compiler out there to use "fat" pointers and other techniques to
catch all undefined behavior, either at compile time or runtime. I
also very much want this to be entirely optional, and for it to be
expressly stated that no "good" C++ program should depend upon such
checks; they should exist only as "terminate the process" asserts
only.
For most programs, we don't care about the speed.
Agreed, and with the current state of the C++ industry, C++ is not the
best language for every situation. Perhaps Java is be more useful for
most programs.
I very much want C++ to remain focused on runtime performance.
However, \at least\ for developing purposes, I would also very much
like \optional\ Java-like runtime checks to catch all undefined
behavior. Unfortunately, it's impractical because it would break all
platform ABIs, and it requires compiler writers to write such things
which apparently isn't going to happen anytime soon.