5 ms·
Newer stuff yes and it is great. However from basic rendering to browsers and the most complex applications (CAD, office software, finance, complex solvers like
by okanat 1y ago
Newer stuff yes and it is great. However from basic rendering to browsers and the most complex applications (CAD, office software, finance, complex solvers like airline planning) are still in C++. Nobody will accept rewriting 35+ years of history.
C++ code bases are really a lot longer-lived than any other software builds upon them. Hence we cannot drop it.
Starting with C++17, I think committee has been doing the language a disservice and piled even more and more unintended complexity by rushing "improvements" like modules.
I don't write C++ anymore due to my team switching to Rust and C only (for really old stuff and ABI). I am really scared of having to return though. Not because I am spoiled by Rust (I am though), but because catching up with all the silly things they added on top and how they interact with earlier stuff like iterators. C++ is a perfect language for unnecessary pitfalls. Newer standards just exploded this complexity.
- jonathrg 1y agoI understand and empathize with your fear. C++23 added a type with 22 constructors (http://en.cppreference.com/w/cpp/utility/expected/expected.html http://en.cppreference.com/w/cpp/utility/expected/expected.h...), that ought to be enough to strike fear into anyone.
- okanat 1y agoIt already has a defect report too: https://cplusplus.github.io/LWG/issue3886 https://cplusplus.github.io/LWG/issue3886 .
- samiv 1y agoDon't worry, C++25 will deprecate half of them and C++27 will remove them while adding 20 new ones just to be deprecated in C++30.
- okanat 1y agoC++ standard and deprecation is a contradiction. They almost never deprecate things. Things always go more complex.
- samiv 1y agoThey're deprecating stuff a lot these days. Add in one version and remove in the next. https://en.cppreference.com/w/cpp/locale/codecvt_utf8.html https://en.cppreference.com/w/cpp/locale/codecvt_utf8.html https://en.cppreference.com/w/cpp/algorithm/random_shuffle.html https://en.cppreference.com/w/cpp/algorithm/random_shuffle.h...
- ra1231963 1y agoI believe with a little (okay a lot of) motivation and a solid LLM, these can all be rewritten faster than everyone says. Especially if it’s gradual. Mozilla and Dropbox did it. LLMs are good at translating between languages, and writing unit tests to make sure things still work the same.
- flohofwoe 1y agoHow much Rust is actually in Firefox these days? The last numbers I see from 3 years ago is 10%.
- j16sdiz 1y ago> https://4e6.github.io/firefox-lang-stats/ https://4e6.github.io/firefox-lang-stats/ 12%. Assume the progress is linear (not logarithmic like most cases), we just need 60 more years to migrate those c/c++ code.
- ra1231963 1y agoThat was my point — with LLMs the progress would not be at the same slope as with people only.
- flohofwoe 1y agoHave there been any successful attempts yet of translating 'idiomatic' C++ to 'idiomatic' Rust for a large codebase that has been developed over 30 years? What does the output look like? Does the code look maintainable (because mechanical solutions to translate from other languages into Rust exist, the result is just not what a human would write or ever want to work on). Are the prompts to guide the LLM shorter than the actual code base to be translated? Etc etc... eg the idea to use LLMs for migration is quite 'obvious', but the devil must be in the details, otherwise everybody would be doing it by now.
- okanat 1y ago