Re: Refactoring tools available for Cocoa / ObjC?
Re: Refactoring tools available for Cocoa / ObjC?
- Subject: Re: Refactoring tools available for Cocoa / ObjC?
- From: Marcel Weiher <email@hidden>
- Date: Tue, 2 May 2006 12:52:08 +0100
Hi Eric,
On 2 May 2006, at 02:21, Eric Lin wrote:
Coming from Eclipse / Java, I've been spoiled by the ability to rename
any identifier in my code (class, method, variable) and have the IDE
automatically (and reliably) replaces all occurrences of the
identifier through my code.
Yes, this is a useful feature the Eclipse folks snarfed from Smalltalk.
This enable me to prototype my code
quickly and refractor later. Unfortunately, I couldn't seem to find
any equivalent technology for Cocoa / Obj C. Is there a reason for
this? Does Obj-C's loose-typing affect this somehow?
Not really. See what http://www.refactoring.com/tools.html has to
say about the Smalltalk Refactoring Browser:
"The original refactoring tool, and still one of the most full-
featured. To all those who think that PhD projects are doomed to
irrelevance consider that these efforts led to a whole new capability
in programming tools."
Considering Smalltalk generally doesn't even have type declarations,
I think typing is a red herring in this context, just as it is in
many others. (For example, the HotSport Java VM was also mostly
snarfed from Smalltalk...)
Issues to deal with in Cocoa and Objective-C are (a) the C pre-
processor, which means you have to run the compiler to get "real"
symbols (b) various non-code locations for selectors ( plists, nib
files, models ) related to that (c) the fact that we are putting more
and more "code" information into strings and finally (d) separate
compilation, which means the link between providers and users of code
can be pretty tenuous.
None of these is a show stopper, they can all be addressed and need
not even prevent a useful refactoring tool from existing without
addressing some of them. However, considering Xcode's indexing and
search are still problematic after many years, I wouldn't hold my
breath for symbol based refactoring, and probably wouldn't really
trust it either.
Marcel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden