News for hackers. Stuff that matters.
Re:Why Rust Isn't Killing C++ by oxfordmale on Thursday May 02, 2024 @12:19PM (#40237988)
There is simply no good economical reasons to rewrite the worlds C++ codebase in Rust. It might be more elegant, but there is no return on investment.
Re:Why Rust Isn't Killing C++ by threatofrain on Thursday May 02, 2024 @12:23PM (#40238040)
In the same sense that developing slightly better buildings shouldn't mean tearing down old ones.
Re:Why Rust Isn't Killing C++ by oxfordmale on Thursday May 02, 2024 @12:57PM (#40238461)
Old building decay over time. A lot of COBOL still runs fine decades later.

Anyone involved in a major refactor knows it is a minefield. It should only be done as part of a strategic upgrade, not because Rust is "better" than C++.

Re:Why Rust Isn't Killing C++ by threatofrain on Thursday May 02, 2024 @01:10PM (#40238617)
Old doesn't mean unmaintained, old buildings have run longer than COBOL has existed. Tearing down an old building just because a new building is objectively better can still be seen as a shameful waste, and although I don't know much about construction, I'm sure tearing down and rebuilding is also a minefield.
Re:Why Rust Isn't Killing C++ by cqqxo4zV46cp on Thursday May 02, 2024 @12:31PM (#40238133)
“No return on investment” is not the same as “not worth it”. There is benefit in Rust over C/C++ in plenty of use cases. There is still a daily background noise of software security issues caused by poor memory safety practices. The solution to this is not to keep pretending that humans will somehow get better at writing C code. They won’t. It’d also be lovely to reduce the circumstances in which we all have to deal with the utterly arcane build tooling that comes along with a typical C/C++ codebase.

Reasonable people could disagree about whether or not a migration of a particular codebase is worth it. A general / absolute argument in either direction is not reasonable. And this whole thing is muddied by the fact that there’s CERTAINLY a material contingent of, frankly, incredibly delusional C/C++ developers that can’t stand the mere thought of change, nor the implication that these languages may not be perfect. Some even wearing the inscrutable nature of their tools of choice as a point of intellectual pride.

Re:Why Rust Isn't Killing C++ by oxfordmale on Thursday May 02, 2024 @01:01PM (#40238514)
Just go tell your CEO you are going to rewrite all the C++ at your company into Rust, taking months of Engineering effort, and deliver the exact same functionality at the end of it.

A refactor needs to be part of a strategic initiative. If security is paramount to an organisation, a refactor to Rust can be worth it. Doing new projects in Rust can also be a valid decision.

Re:Why Rust Isn't Killing C++ by bluGill on Thursday May 02, 2024 @01:21PM (#40238784)
My company did rewrite some old code - starting about 15 years ago. It took a billion dollars over many years to get to more or less feature parity. (there are some rarely used features we will never port). On hindsight I think we should have refactored the existing code in place - it would have been similar costs and we are already seeing with hindsight many of the things we thought was good are not where we want to be with the new code either.