3 ms·
> [...] This is the irony of C++. While there is a very nice subset of the language, that does nearly all the same things Rust does. You still have 30 years of
by gpderetta 11y ago
> [...] This is the irony of C++. While there is a very nice subset of the language, that does nearly all the same things Rust does. You still have 30 years of legacy laying around. You likely won't find a job that EXCLUSIVELY follows the C++14 guidelines. You WILL have to learn the legacy patterns, and work with legacy code, and make legacy mistakes.
Large existing codebases are a strength of C++ though. Any new replacement language won't magically make those codebases go away.
> [...] But legacy C code never stood in the way of C++'s adoption. There are always gonna be MORE programmers tomorrow, then today. People adopting a language is hardly a zero sum game.
The killer feature of C++ was the seamless interoperability with C which allowed trivial use of C libraries, and, most importantly, easy piecemeal evolution of large C codebases.
For example GCC is begin ported to C++ with relative ease, while a rewrite in rust would be a significantly more complex endeavor.
Then again, beyond lifetime checking, rust and C++ are very similar languages and seamless interoperability is not inconceivable. I believe that's the missing feature for rust to achieve world domination.
- valarauca1 11y ago>Large existing codebases are a strength of C++ though. Any new replacement language won't magically make those codebases go away. Which I already said... >>I don't debate this fact. But legacy C code never stood in the way of C++'s adoption. There are always gonna be MORE programmers tomorrow, then today. People adopting a language is hardly a zero sum game. >For example GCC is begin ported to C++ with relative ease, while a rewrite in rust would be a significantly more complex endeavor. Source or opinion? >Then again, beyond lifetime checking, rust and C++ are very similar languages and seamless interoperability is not inconceivable. I believe that's the missing feature for rust to achieve world domination. No I agree. Seemless importing with C++ would be amazing. Name mangling in C++ is just a bit of an issue. Rust works great with C. The FFI is very stable. I use Rust libraries at work as generating 32bit DLL's is possible with nightly.
- dikaiosune 11y agoI haven't used it yet, but Rust supposedly works very well with C libraries, both calling into them and being called from them.
- mcguire 11y agoThe hardest part is creating the comfortable, Rust-ish interface. Actually interacting with C code is trivial.