3 ms·
This is where statically typed code bases really shine IMHO. I've seen >10 year old Java code bases that are maintainable because of all the automated re-facto
by narrator 13y ago
This is where statically typed code bases really shine IMHO. I've seen >10 year old Java code bases that are maintainable because of all the automated re-factoring that can be done to clean up naming inconsistencies and deprecate various mistakes. With dynamic languages cruft and little mistakes just keep building up till people give up trying to maintain it and want to start over.
- gnaritas 13y agoAutomated refactoring came from dynamic languages. Just because the popular ones lack it doesn't mean it's not done. Smalltalk's refactoring browser works very well.
- malandrew 13y agoI'm curious how easy it is to build automatic refactoring tools on top of a dynamic language that was not designed to support it, versus a static language that was. I reckon that the formalism enforced by static typing would provide enough vigor to greatly increase the chances that you can bolt on automatic refactoring as an afterthought. My impression is that the SmallTalk designers adopted some automatic refactoring early on because they developed their tools alongside the language and by doing so, the language informed the tools and vice versa.
- gnaritas 13y agoSmalltalk wasn't designed to support it, it's decades older than the concept of automated refactoring. It is much easier to do in static languages, and doing so in dynamic languages requires code analysis at runtime. As it's always runtime in Smalltalk this fits naturally, it wouldn't be so in Ruby or Python where you're working on text files rather than a runtime.
- malandrew 13y agoCool. Thanks for the clarification. Language design is something that I'm increasingly taking an interest in.