Re:Writing Rails code makes me miss writing in Objective-C. ...
by billmcneale on Thursday July 15, 2010 @12:55AM
(#1517000)
Most of these refactorings required human intervention, even for simple refactorings like "Rename". When the IDE doesn't have types, some refactorings are simply impossible to perform automatically.
For more details and examples:
http://beust.com/weblog/2006/10/01/dynamic-language-refactor...
Re:Writing Rails code makes me miss writing in Objective-C. ...
by ekiru on Thursday July 15, 2010 @02:04AM
(#1517079)
The arguments in your linked article are inaccurate. For example: the Refactoring Browser described in "A Refactoring Tool for Smalltalk"(at http://st-www.cs.uiuc.edu/users/droberts/tapos.pdf ), was capable of determining which sends of a renamed message were to the class on which it is to be renamed by analysis of the program's dynamic behavior.
There's of course a limitation on this. To quote the paper: "The major drawback to this style of refac- toring is that the analysis is only as good as your test suite. If there are pieces of code that are not executed, they will never be analyzed, and the refactoring will not be completed for that par- ticular section of code. "
Re:Writing Rails code makes me miss writing in Objective-C. ...
by billmcneale on Thursday July 15, 2010 @09:53PM
(#1519931)
The impracticality of this technique notwithstanding, the article is perfectly accurate based on your own summary: in a dynamically typed languages, automatic refactorings are never 100% safe.
Most of the refactoring tools that Java IDEs have originated in Smalltalk, an extremely dynamic language.