3 ms·
Safe automatic refactoring requires the ability to do static analysis of the code. Many refactorings are harder in loosely-typed languages.
by cratermoon 6y ago
Safe automatic refactoring requires the ability to do static analysis of the code. Many refactorings are harder in loosely-typed languages.
- grahamlee 6y agoRefactoring tools were invented in Smalltalk and worked just fine.
- disgruntledphd2 6y agoThis has always surprised me, since I learned it. What are the features of Smalltalk that allowed this to happen? Conversely, what is stopping this from existing in more modern dynamic languages?
- xkriva11 6y agoSmalltalk has simple and strong reflective features. Moreover, it does not make a difference between the developed program and IDE. This means that doing things like that are very natural and well established in the Smalltalk cultural background.
- grahamlee 6y agoIndeed. Having the whole system in front of you, and knowing how patterns like MVC or Thing-Model-View-Editor encapsulate parts of it, makes it very easy to "reason about" wholesale changes to the system.
- cratermoon 6y agoSmalltalk is dynamically typed, but I wouldn't call it loosely typed. It's closer to Ruby's "duck typing". I was thinking more of Javascript and PHP. Weak and loose.