3 ms·
Modern C++ has addressed none of the reasons Linus originally rejected it. Those reasons were widely misunderstood, but I tried to explain them at the time and
by jerf 3y ago
Modern C++ has addressed none of the reasons Linus originally rejected it. Those reasons were widely misunderstood, but I tried to explain them at the time and it seems to have helped at least some people: https://news.ycombinator.com/item?id=1422160 https://news.ycombinator.com/item?id=1422160 Given the original objections, it should only be even more objectionable now as C++ has added even more subtleties and even more you have to understand in order to fully grok what a given bit of C++ code is doing.
I'd also disagree with the idea that it's lower effort to add C++ than to use Rust. C and C++ have diverged wildly. Knowing C means you can mostly write C (and that only mostly) in C++ but it does not mean you know C++ anymore. Maybe literally 30 years ago you could show a C programmer how C++ compiles down into C and that would be enough for the C programmer to start bashing away at C++, but that day is long past. In terms of whether it is easier to ask a kernel developer to learn Rust or to learn C++, bearing in mind a kernel developer would be pretty much required to learn all of C++, every last quirk and every last detail, it honestly could still be advantage Rust on that front. Katamari Dama-C++ is a monster.
- bryanlarsen 3y agoThey're talking about a very small strict subset of C++. For example, it excludes function and operator overloading, so your 2010 comment is handled.
- pointlessone 3y agoI’m not familiar with C++ so might be a silly question but is it possible/easy to enforce usage of an arbitrary subset of the language features?
- bryanlarsen 3y agoEasy? No. But the Linux kernel is one of the places where it is definitely possible. Kernel patches are well reviewed both manually and automatically.