|
|
|
|
|
by IshKebab
57 days ago
|
|
Interesting, I think you're interpreting the quote in a different way to me. It it "People complain about C++ and not Foo because even though Foo is better, C++ had to be crap in order for people to use it." Or "People complain about C++ and not Foo because although they are equally crap, nobody uses Foo so there's nobody to complain about it." I always thought it was the latter. Unfortunately I can't find much more on where he actually said this than his own quotes page which also doesn't really clarify anything: https://www.stroustrup.com/quotes.html |
|
There's so many problems that no other language has due to the backwards compatibility guarantees Bjarne made to get companies using the language.
For example, C guarantees ABI compatibility. Object files from an older compiler/standard can be linked with newer versions of the compiler/standard. This is great if you want to distribute a proprietary library to end-users without revealing source code (libcuda & legacy enterprise tools).
But this guarantee applied to C++ means a templated function in the standard library can almost never change the implementation.
As a result of extending the guarantee to templates, the C++ standard library must create new classes and functions then deprecate the old ones, meaning they can't do basic optimizations to older code. A big complaint is "too many ways to do the same thing".
Rust doesn't make this guarantee.
That allows them to make a cleaner language with less duplication, but mostly forces Rust crates to be open-source.
Nvidia shipping libcuda.so in Rust means having to upgrade Rust constantly and potentially forcing customers to, or releasing the CUDA source code which hurts their competitive advantage.
Bjarne could've designed a number of OOP languages in the 70s and 80s. Smalltalk, Eiffel, and Simula, were better languages. But he built C with classes which is the reason it's used today.