freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] Renaming methods...


From: Hal Fulton
Subject: [FR-devel] Renaming methods...
Date: Mon, 06 Oct 2003 19:26:38 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030820

*Some* refactoring tasks may be automated without too much trouble.
This one seems problematic to me.

The more I think about this, the more perturbed I am.

I think that the (outwardly relatively simple) task of renaming a method
is going to require a full parser and maybe even some artificial
intelligence.

Suppose classes X and Y each have a foobar method; and I want to change
X's foobar to blah.

In code, how can I distinguish these? I may see

  a.foobar
  b.foobar

How could I possibly know which one to change?

I could look for something like  a = Y.new  but that is clumsy; and
what about branching and so on?

And what about

  z = some_method_which_may_return_X_or_Y
  z.foobar

How on earth do they do this reliably in Smalltalk?

Hal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]