| ▲ | jimmaswell 3 hours ago | |||||||||||||||||||||||||||||||||||||
A rewrite is a slam dunk for any decent frontier AI. It has a penchant for maintaining API/etc contracts to a fault in the absence of instructions to the contrary. It can easily validate its work and loves building exhaustive test cases. You can tell it to get 100% code coverage if you want. It will laborously accurate document every accumulated edge case and help you find a better overall cohesive structure. A rewrite has historically been a huge mistake in many situations, some of which I've personally had the agony of witnessing firsthand, powerless to stop it. But AI completely changes the calculus because it doesn't waste significant developer time or energy crawling back to the previous working state, it just does it while you go get coffee. And this I've found to be a huge benefit, that I can continue making my codebases nicer to work with and better documented/integrated with bugs stamped out for free. There are upsides to a rewrite, and they're now much more likely to be worth it as the downsides are automated away. | ||||||||||||||||||||||||||||||||||||||
| ▲ | amelius 2 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
If this was true then Python would already have been rewritten to be GIL-free, and the entire ecosystem of Python packages would have been rewritten to respect its API. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | InsidiousWombat 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I'd even argue AI is better for maintaining/moderninzing existing code than writing it, just because there is so much less input from developer about architecture it requires, as it has it in the code itself. But there is pretty big risk of false positives and negatives; some "bugs" are design decisions that were not documented well/at all, and inevitably some new ones will appear when it reasoned something wrong. | ||||||||||||||||||||||||||||||||||||||
| ▲ | stavros 3 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
The entire point of a rewrite is to get rid of the behaviour you don't want, while you keep the behaviour you do want. Consider the pathological case: Rewriting your FORTRAN codebase in Rust would obviously be useless if you had to reimplement every bug in the rewrite. An LLM doesn't have enough context to know what you so and don't want. If you give it call logs for every function that was called and how, maybe, but a seasoned engineer will have more context around what the company needs. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||