3 ms·
It is easy to know why the world's highest-paid programmers, coding for the world's most demanding applications, use C++ and nothing but C++: nothing else is ev
by ncmncm 6y ago
It is easy to know why the world's highest-paid programmers, coding for the world's most demanding applications, use C++ and nothing but C++: nothing else is even trying to be useful in those applications.
C++ has sharp edges and pitfalls to stay clear of, so users ... do stay clear of them.
A usable, better language would gain users. But nothing is even on the horizon.
Rust is closest, but its designers have consciously chosen not to support the most powerful of C++ features, to try to keep the language more approachable. Yet, Rust complexity is already beginning to rival C++. Some of that complexity is in how to work around the language's deliberate limitations. As Rust matures it will suffer from unfortunate early choices in precisely the way C++ has, and will only get more complex.
Every choice in the C++ design has been to provide better ability to capture semantics in libraries, so that independent libraries integrate cleanly with each other and the core language. People can use libraries with confidence that they are giving up no performance vs. open-coding the same feature.
Access to the most powerful libraries depends on language features no other language implements. Thus, the best libraries will only ever be callable from C++ programs. With (literally!) billions of lines of code in production use, abandoning interoperability is not a choice to take lightly.
When you start a big project, you never know what it may come to need. If your language "won't go there", your program won't, either, and you will be stuck with unpleasant choices. This is the concept of a language's "dynamic range", a more meaningful measure than "high" or "low" alone: how high can it reach, how low can it reach, how far can it reach, at once? C++ is king of dynamic range. Nothing else comes close, or is really even trying.
- oblio 6y ago> It is easy to know why the world's highest-paid programmers, coding for the world's most demanding applications, use C++ and nothing but C++: nothing else is even trying to be useful in those applications. There's no proof of this. The world's highest-paid programmers tend to work for FAANGs and a few other categories of businesses, and they might or might not work in C++, and they tend to move up the ranks by being able to scale humans (other devs), not raw tech. It's a myth that being an über-geek is well paying, by the way.
- ncmncm 6y agoI will be sure to pass that fact along to all the well-paid über-geeks I know (who will be quite surprised at their misapprehension). But there is no necessary relationship between "the world's highest-paid", and your notion of "well paying". You could be simply wrong, or your measure of "well paying" could exceed what the actual "highest-paid programmers" cited get. Dan Luu did a good essay about programmer compensation a few years back.
- tene 6y agoCould you provide some examples of C++ features that the Rust team has consciously chosen to not support, to try to keep the language more approachable? Could you show some examples of how you need to work around these deliberate limitations?
- ncmncm 6y agoOperator overloading. Standard library user-provided allocators. Move constructors. Inheritance. Certain kinds of specialization. SFINAE. Somebody who knows Rust better, and C++, will be able to supply a longer list. There is a corresponding list of features C++ doesn't have yet, and others it is precluded from having. That programmed move-constructors can fail sucks. Thst moved-from object's still exist sucks. Providing examples here would be more work than I am prepared for just now. (I am not happy to say so.(
- steveklabnik 6y ago* Operator overloading: already in Rust * Standard library user-provided allocators: in nightly, on their way to stable * Move constructors: not in for technical reasons and performance reasons, not for approachability * Inheritance: not in for technical reasons combined with a lack of demonstrated need rather than just desire, not for approachability * Certain kinds of specialization: you're hedging with "certain", but specialization is in nightly, and used in the standard library. * SFINAE: Rust doesn't use templates, so this as a direct feature doesn't make sense. I'm not aware of any proposal to include something similar in Rust, the team has never said that this wouldn't be in for approachability > Somebody who knows Rust better, and C++, will be able to supply a longer list. I don't think your thesis is accurate, so I don't think so. And if this is so obvious, as you claim, then you should be able to provide examples!