On Friday 06 September 2002 04:50 am, Christian Szegedy wrote:
<snip>
> Refactoring browser: I think this is inherently impossible in Ruby, or
> at least so complicated that I don't think that anyone anytime could write
> a usable one.
>
> Why?
> One of the most powerful features of Ruby is its reflexivity
> and possibility to manipulate the ojects and object hierarchy in a very
> very high level (I make use of it more and more). You can write methods
> (such as attr_accessor) which defines methods automagically. And you can
> write methods which generates methods which generates methods which ... ->
> oo And all the generated methoods can make use of data members depending on
> the generating functions in several complicated ways.
>
> How should a refactoring browser know, which methods generatad the
> methods that generated the methods that make use of the data member, in
> order to change it?

Well, for starters:  any browser, refactoring or otherwise, is dealing with 
source code, not the run time product of executing that code.

>
> This level of reflexivity (meta-programming) is a very concise feature in
> Ruby and of great value for me and I would (and could)
> not want to give up this features for a refactoring browser.

Why would you have to give up anything just because someone else uses a tool?

>
> Besides:
> I don't think refactoring browsers are a good idea in general:
> they delegating semantic tasks from the language which belong
> to the language to syntactic tasks in an interactive environment.
> But this has to flaws:
> 1) This is always error prone since the browser must understand the
> language completely. Therefore refactoring browsers work only for very
> stably defined languages. (Or restrict your usage of the language.)
> 2) The lack of automatization of tasks: since you have to manipulate your
> code manually, the automatization of refactoring processes is impossible
> unless you have a separate scripting language which controlls your browser.
> But I think it is a dead end.
>
> The right solution in my view is Ruby's : the language itself is allowed
> to modify the class hierarchy and the programmers should use high level
> abstractions in order to make his programm easily refactorable via these
> built-in features.

All you have described above about Ruby is true in spades for Smalltalk.  Yet,  
Smalltalk has and makes good use of refactoring browsers.  I think you are 
confusing source code with run time dynamics.


>
> Regards, Christian