Hacker News new | ask | show | jobs
by furyofantares 357 days ago
LLMs are terrible at that in my experience. In what world is refactoring "very local in reasoning"?

Switching libraries/frameworks or switching piecemeal to a new language for a codebase that's already well structured seems like it would be noticeably less costly though.

1 comments

In a situation where the transformations are explicit and can almost be mechanical with little to no involved reasoning. With those requirements, the LLM just has to recognize the patterns and "translate" them to the new pattern. Which is almost exactly what they were designed to do.
Agree with that but it doesn't really fall under the umbrella that I'd use the term "refactoring" for.

Replacing something with something else isn't a refactor to me, a refactor implies a structural change not a wide surface level change.

There’s a famous book called “Refactoring”