I agree. I made rewrites all the time (and from lang to lang, to architecture to another). Rewrites are a net plus for me.
What is important is that $new_lang or $new_arch MUST help to cut in big ways problems and/or code.
To say something minimal, Rust eliminate (except when interfacing with $old) NULLs. Also, pattern matching make a lot of problems go away, FOREVER.
This mean, that is like have another developer also helping in cut work and at the same time increase quality.
This is not limited to compilers. For example, I work for business apps and use RDBMS a lot. Use a RDBMS well? It cut work and increase quality.
Rewriting queries, schemas and using indexes, views and ANY trick the RDBMS allow you (the idea "not use a DB at full because 'data independence' is poison if not VERY well justified) help by spades.
So:
- Naive rewriting = VERY BAD
- Move from $old to $new WITHOUT the help of a "improved" architecture, feature, tooling or concept = WASTED
- Move from $old to $new with better? TOTAL WIN.
P.D: I think move from too similar Langs probably will waste stuff. You see much more bang from your buck when move from imperative to functional, than from imperative to imperative. Not because functional is superior, but because it force to bring power (use of inmutable and algebraic types, for example) that before was dependent on discipline...