4 ms·
C++ provides high level stuff at the expense of making the programmer part of the compiler that must give it hints about memory, types or cope with multiple pag
by givan 14y ago
C++ provides high level stuff at the expense of making the programmer part of the compiler that must give it hints about memory, types or cope with multiple page error outputs because of one missing semicolon.
C++ exists because real high level languages does not have very efficient compilers yet.
And where high performance is really needed and programmers time or effort is not a problem C++ is preferred.
I expect that with the increasing processing power compilers will get some AI incorporated and get smarter in the future and high level languages will output binaries that are at least as fast as those produced by C++ or C compilers.
- npsimons 14y agoC++ exists because processing power and RAM used to be at a premium; these days, hardware is so cheap, you can get away with writing inefficient code in any language. However, two things are of note here: C++ has had a lot of higher level features bolted on after the fact, including compiler warnings and tools to help reduce burden on the programmer, and higher level languages have had a lot of performance "bolted on" (plus hardware has gotten so much faster and cheaper) so that if you code properly (in any language), performance differences are near negligible. C++ mostly hangs on because of backwards compatibility and a large user base; I suspect that as time goes on, we'll see it fall more and more by the wayside (and I say this as someone whose bread and butter is C++), especially with the fact that programmer time is a big cost driver.
- comicjk 14y agoIf you're writing games or scientific programs, you still need C++, if not Fortran or assembly.