3 ms·
There is absolutely no reason why this wouldn't be possible in a dynamically typed language. I'm in the process of building such a tool for JS, in fact. You do
by joepie91_ 8y ago
There is absolutely no reason why this wouldn't be possible in a dynamically typed language. I'm in the process of building such a tool for JS, in fact.
You don't need static typing to do codebase-wide renaming, it just makes it a little easier to build the refactoring tools, but since that is a one-time cost it's not really a particularly important factor in the language design. Other language design decisions have much more influence on this development cost, too, such as reassignability and scoping rules.
"Strong typing" is also something totally different from "static typing" - I'm not sure why you're bringing it up here. The two are not interchangeable terms.
EDIT: Actually, doesn't Webstorm already do such mass-renaming for JS?
EDIT 2: I also object to the use of the word 'refactoring' to refer exclusively to renaming variables. Proper refactoring involves much more work, most of which isn't automatable regardless of the language you're using.
- linkmotif 8y ago> You don't need static typing to do codebase-wide renaming. But you do. WebStorm isn’t magical. It can’t understand your untyped code like it can understand typed code. The more I’m reading your comments on this thread the more I’m not sure you’ve ever used a static typed language with a good IDE. If I am correct, I think it makes more sense for you to try Java/IntelliJ and then weigh in on this subject. You may have a very different opinion.