only half joking.
only half joking.
Honestly, as long as the second system effect doesn't ruin everything and you still make the new codebase better than the old one (i.e. it's small enough to actually be rewritten and testable enough to make sure that it actually works, with the abstractions that you now know you need and have solidified enough to be the right ones, without too strict deadlines and only as much backwards compatibility needed as you can provide, as well as buyin from whoever is paying you), then unironically go for it.
That's way fewer projects out there than people probably think. Plus, a lot of the wrongly started rewrites will go up in flames. Oh and it's probably also going to go wrong if people don't actually know the new language or tech.