Alan Keefer
Posts: 29
Nickname: akeefer
Registered: Feb, 2007
|
|
Re: imperative, and functional, and oo, ...
|
Posted: Jul 9, 2007 2:03 PM
|
|
> The Smalltalk refactoring browser is indiscriminate. If > you rename a method it renames all methods with that name > on all classes in the image. > > It's just the most conservative option. > > Should be easily enough to do in JavaScript and Ruby, > reflective cases aside.
My real point was that those tools don't exist for Python, Ruby, or Javascript (as far as I know, at least); the various tools/IDEs I've seen for those languages are painfully bad compared to the Java tools. Bad enough that they make me want to not do cleanup refactorings, at least. And while those languages lend themselves to cleaner code in the short term, I think that the long-term potential for code cleanliness is harmed by the lack of such tools; I, at least, find that my Ruby or Javascript code degrades over time more than my Java code does, mainly because I get lazy and avoid refactorings that I would be more likely to do if they were safer and more automatic. That could just be a personal failing of mine, but I'm guessing that other people have had the same experience. Minimal tools that essentially do little more than a text-based find-and-replace just don't do enough for me to make them useful.
The Smalltalk IDE, which I have no personal experience with (and thus all I'm saying is essentially hearsay and my own muddled understanding of it), constantly gets raised as a counterpoint to the "the tools suck" argument. They did it for Smalltalk, so of course it'll happen for Ruby or Javascript, right? My limited understanding is that doing that for a dynamic language requires that you basically be constantly running the actual code, which seems slow (on a large code base) and heavily reliant on the quality and coverage of your tests. My (limited) personal experience is that code coverage is never as complete as you want it to be, and that relying on test coverage to make refactoring tools work well will generally lead to some poor-quality refactoring tools. My understanding is also that the Smalltalk IDE supported a very primitive set of refactorings compared to what Eclipse or IntelliJ can do for Java.
Again, my personal experience with Smalltalk is nil, so I could just be demonstrating my ignorance here, but my point was really that the tools don't currently exist, and the existence of the Smalltalk doesn't serve as proof to me that they will eventually come or that they'll be any good when they do.
It might be the case that the other advantages of dynamic typing outweigh that, but it's certainly a pretty marked advantage of static typing. So I think some solution that lets you retain that advantage while incorporating the best advtanges of a dynamic language could turn out to be the best option.
|
|