I believe that C++ continues to be a standard because, for >99% of programs on >99% of machines, compiled C/C++ is faster than anything else (and C++ is nicer than C).
Why are compilers for high-level languages so much worse than human C++ programmers? My understanding is that you don't have to be a C++ programmer to write C++ code that can't be beaten by any other language. This is an AI question, but maybe also a systems question.
I would like to see a series of challenges for compilers, possibly in the style of a competition between programmers who work on compilers. Starting with really simple programs, make sure that they compile to something as fast as C++... and progressively, the test programs become more complex.
(1) Are all languages equally good at printing "Hello World" 1 million times?
Or better, a question that doesn't involve system calls:
(2) are all languages equally good at computing Fibonacci numbers, written with tail recursion?
Why are compilers for high-level languages so much worse than human C++ programmers? My understanding is that you don't have to be a C++ programmer to write C++ code that can't be beaten by any other language. This is an AI question, but maybe also a systems question.
I would like to see a series of challenges for compilers, possibly in the style of a competition between programmers who work on compilers. Starting with really simple programs, make sure that they compile to something as fast as C++... and progressively, the test programs become more complex.
(1) Are all languages equally good at printing "Hello World" 1 million times?
Or better, a question that doesn't involve system calls:
(2) are all languages equally good at computing Fibonacci numbers, written with tail recursion?