> Date: Mon, 7 Oct 2024 09:24:34 -0700 > From: Per Bothner <p...@bothner.com> > > > > On 10/6/24 11:18 AM, Gavin Smith wrote: > > Now imagine that half of DomTerm gets rewritten in Rust and then you > > are scratching your head looking at a bunch of Rust code that you barely > > understand when trying to fix problems in DomTerm. That's the situation > > you are promoting for Texinfo. > > First, compared to C++ to Rust, moving from C to C++ is much more modest of > terms of > code changes as well as new skills needed.
That was maybe true 10 or 15 years ago, but is no longer true: C++ got a lot of additional baggage, standard classes and libraries, and is now very different from C. Converting a non-trivial C program to efficient and easily maintainable C++ is a very large job, which includes refactoring the main data structures and algorithms into the equivalent C++ classes. Since you are advocating C++ due to its safety, I'm sure you will agree that the entire memory allocation strategy will have to be redesigned and reimplemented to achieve this safety, otherwise why bother at all? Once again, you can see this in action on the example of GDB, where core parts of the code keep being redesigned and rewritten to this day in significant ways. That's what conversion to C++ means in practice, and there's no way around that.