Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The languages I use the IDE literally does this for you, perfectly, deterministically.

And instantly, certainly when compared to AI.

 help



That doesn't update documentation or comments referring to the function. I prefer search-and-replace.

Sure it does. IntelliJ will do that just fine.

Sounds like it doesn't catch everything and they recommend search-and-replace. From their docs: "For example, if you want to replace a variable name with a new name for a large project, use the Replace in path instead of the Rename refactoring since your variable can appear in the config files as well."

Which languages, just out of interest?

That should be most? Unless you do very weird stuff like using strings in JS to call functions, or reflection in C# and similar very special cases, any IDE can handle that.

Kotlin, Java, Python, C#, Typescript. Anything that has a trustworthy and consistent pointer between code.

Ruby would be the one exception I’ve worked on in my head, and for they language, ctrl+f *usually* (but not always) finds the rest.

Ruby is particularly magical with being able to evaluate methods from dynamic strings into running, production code[0]; but otherwise, languages and capable IDEs, like IntelliJ and Visual Studio just support that. I don’t happen to use VS Code, but I assume it has basic refactor, too.

[0] Devise. https://github.com/heartcombo/devise/blob/main/lib/devise/co...


Java has very good refactor support. I use jdt.ls which is eclipse based, but I've heard intellij is even better. I've wished for similar refactor actions in other langs.

Yeah, VSCode will rename functions and vars perfectly, using the language semantics. It'll handle changing imports in python if you change file names.

Like you said, it's basically instant.


If IDE can do it, a custom tool can do it to. IntelliJ even have a built in MCP server ready to help any agent with such tasks.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: