logoalt Hacker News

stavros • today at 1:16 AM • 3 replies • view on HN

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.


Replies

habitue • today at 1:30 AM

Not necessarily, a rewrite can just move to a language that's easier to maintain (off C / cobol).

Honestly though, it's pretty clear the AI rewrites work, we have a ton of high profile examples. It's just a holdover attitude about rewrites from before AI. In reality, AI is going to make the code better when it rewrites

➕ show 1 reply
literalAardvark • today at 1:58 AM

Defining the legacy bugs and porting them as features during the rewrite is actually one of the most difficult parts of enterprise rewrites.

You don't get to pick what parts of the API you're porting during something like that, it has to work the same or some of the ecosystem around it will break.

➕ show 1 reply
ravishi • today at 2:38 AM

The thing is, to get rid of unwanted behavior the first step is to document all the behavior and be able to reimplements it. Then you can pick and choose what to keep vs what to dump.

And AI is really good at all the stages here.