3 ms·
Legitimate questions. Certainly, the overwhelming majority of existing portable-ish software in whatever language will not be rewritten. It won't be as bad as
by ncmncm 4y ago
Legitimate questions.
Certainly, the overwhelming majority of existing portable-ish software in whatever language will not be rewritten. It won't be as bad as code written in the '60s, running on an emulator on an emulator... five deep, which does exist! But they will be recompiled and carried along until they become irrelevant. Code to operate pagers and fax machines is largely retired already.
C coders will always have a job maintaining the legacy stuff, just as people make good money patching COBOL.
C++ has no borrow checker. That turns out not to matter so much as some people insist. It mainly just means that people writing libraries need to step up to do, in the library, what the Rust compiler does. But faster. Users of those libraries get the safety Rust advocates claim as all their own. But C++ also enables library writers to do many, many things Rust simply cannot be made to do, resulting in wholly more capable libraries, and much that it will never do.
We will not "stay with C++ forever". We will stay with C++17 until we get C++20 support, and with C++20 until we get C++23 support, etc. The language is changing fast to meet needs its users face, with a depth that no other language is even trying to match. Someday a language may arise that can grow to match C++. It once looked like Rust might have developed to be that.
- eternityforest 4y agoRust is Turing complete. There's nothing a Rust library can't do, there are only ways in which rust cannot do things. I think the whole point of rust is to not do things in ways that the computer can't prove are correct. But like any language, it gives you other ways to do those things. It's almost like stack overflow's habit of telling people to do something else instead of what they asked, but enforced by the compiler so your manager can't make you do it the "simple and interesting but unsafe way". There are a lot more libraries in the world than language writers, and there are bugs in libraries. Plus, you often have to malloc and free and all that even if you are using libraries for everything. Mistakes happen, CVEs happen, and the world loses trust in software a little more every time.
- ncmncm 4y agoAssembly language is also Turing-complete. But you will not see an assembly-language borrow checker. There are bugs in libraries, and bugs in compilers. The more each is used, the sooner they are cleared out. The more useful each is, the more it is used. You can write more-useful libraries using features found only in C++ than you can write in other languages. It has been many years since I coded a malloc or free, and I don't expect ever to code one again.