| Thanks for your reply. > Not all of us see C++ as an improvement over C. I know, but you are the first I've encountered to quantify it. > The result is code that is easily FFI'able from any language I agree that this is a big advantage for interoperability. While it's possible to build an interface in C++ with 'extern C', it means maintaining two call APIs rather than one. Still I see this as a current limitation of C++ rather than an advantage of C. > Using a simple macro in C: Is generally a pain as the macro is expanded at compile time and causes difficulties debugging. Your point about VTABLEs is well taken however and I have encountered subtle bugs with virtual member functions in C++. > If I want to get speed via multi-core rather than pure uniprocessor speed, why use C++? I can use Haskell and get much easier and safer parallelism with many other advantages. You would need to enumerate those advantages for me to answer. Why then wouldn't you use Haskell instead of C? |
The question is not why Haskell not C, sure if you can use Haskell why not, but for most use cases you cannot. But most languages can be used instead of c++, Haskell or Java or whatever, with many advantages.