Using Grep or regex is textual refactoring. If you want to rename every reference to a type Foo, how do you is that without touching any variables named foo, or any classes named FooBar
The answer is use tools that have semantic info to rename things.
Another poster mentioned using symbols and references, another way to refactor code programmatically is to make use of code mods. Code mods are very powerful and this is a use case where I find LLMs to shine as the various syntax and language ASTs are hard to remember (even if you do understand what you're doing).
maccard|2 months ago
The answer is use tools that have semantic info to rename things.
true_religion|2 months ago
Even though it has no semantic significance to the compiler, it does for all the human beings who will read it and get confused.
shimman|2 months ago