4 ms·
Some years ago I would have thought all this would be really cool. But who are they kidding? What sort of people will be able to keep this whole language in the
by socialdemocrat 6y ago
Some years ago I would have thought all this would be really cool. But who are they kidding? What sort of people will be able to keep this whole language in their head.
C++ books were thick bricks already 20 years ago, and students struggled hard to learn it. Now the language is like 3x as complex. Students are going to need a separate bag just for their C++ material.
Sure you can write in a subset of C++ that is easy to get. But when did that ever work? Who has worked in a company and seen people able to stick to a minimal C++ subset?
No, people get tempted and they start using all the new stuff. Short term it is a real gain. But once you hire junior developer who has to read this code, they suddenly have 3x as many concepts to learn and understand.
I predict a serious recruitment problem with C++ down the road. Old timers today will start using all the new features. When management start trying to add new team members they start realizing that it is really hard to get quality C++ developers.
Anyway who tries Go, Rust, Swift, Nim, D or some other moder/semi modern language are going to ask themselves why on Earth they would want to torture themselves with C++.
- nine_k 6y agoThere are good alternatives to C++: Rust and D. There is a number of languages with not quite as high but decent performance and varying expression power: Java, OCaml, Go, even Fortran for numerical stuff (not a joke; modern Fortran is quite advanced, and most likely runs faster then C++). I see rather few reasons to start a new project in C++ in 2021, even though in some niches nothing else is viable, sadly.
- ncmncm 6y agoIt 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.(
- 6y ago