Skip navigation.
 
mlRe: Java vs. Objective-C for Cocoa
FROM : Marcel Weiher
DATE : Sun Apr 24 10:41:27 2005

On 23 Apr 2005, at 23:30, Ondra Cada wrote:

You can find info on the Refactoring Browser at:

    http://st-www.cs.uiuc.edu/users/brant/Refactory/

>
> Yes and no. In theory, HOM does not bring (almost) anything new to
> the "refactoring problems area". It, though -- and do please correct
> me if I am overlooking something important -- considerably emphasizes
> many of them which, in non-HOM environment, stay more or less latent.


Not that I can see.

> An actual example: although the functionality is available for a long
> long time, it is not too common to use a code like
>
> [array makeObjectsPerformSelector:@selector(whatever)]; //1
>
> and I daresay it is betwixt Cocoa programmers rather common to write
> the explicit code of kind
>
> for (NSEnumerator *en=[array objectEnumerator],Foo *foo;foo=[en
> nextObject];) [foo whatever]; //2


You seem to think that refactoring is somehow type-dependent.  I can't
think of a refactoring that is, especially as refactorings are
*behaviour-preserving*.

> On the other hand,
>
> [[array each] whatever]; //1


[[array do] whatever]  would be more correct...

> is extremely common with HOM, being almost an archetypal HOM example.


result = [[array collect] something]  or  queryResult = [[array
select] myPredicate..]  are actually more common, in my experience.

> I may be wrong (well I was often enough in the past), but I cannot
> see a reasonable re-factoring algorithm for "whatever" in those //1
> cases, due to the fact Cocoa containers are completely typeless. That
> in //2 the re-factoring tool can do much better is self-evident.


Refactoring has nothing to do with type.  If you rename the method
'whatever', you just change all senders.  Of course, something like
"find all senders" and "find all implementors" etc. has been part of
Smalltalk browsers since the neolithic...

Marcel

Related mailsAuthorDate
mlJava vs. Objective-C for Cocoa Zacharias J. Beckm… Apr 22, 20:14
mlRe: Java vs. Objective-C for Cocoa Scott Stevenson Apr 22, 21:49
mlRe: Java vs. Objective-C for Cocoa Marianne Kern Apr 23, 00:04
mlRe: Java vs. Objective-C for Cocoa Zacharias J. Beckm… Apr 23, 00:16
mlRe: Java vs. Objective-C for Cocoa Don Yacktman Apr 23, 01:53
mlRe: Java vs. Objective-C for Cocoa Rick Kitts Apr 23, 04:44
mlRe: Java vs. Objective-C for Cocoa John Stiles Apr 23, 06:46
mlRe: Java vs. Objective-C for Cocoa Zacharias J. Beckm… Apr 23, 19:29
mlRe: Java vs. Objective-C for Cocoa Rick Kitts Apr 23, 20:15
mlCocoa Apps on Windows was: Re: Java vs. Objective-C for Cocoa Lars Sonchocky-Hel… Apr 23, 21:02
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 23, 22:29
mlRe: Java vs. Objective-C for Cocoa Thomas Davie Apr 23, 22:43
mlRe: Java vs. Objective-C for Cocoa Rick Kitts Apr 23, 23:30
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 23, 23:41
mlRe: Java vs. Objective-C for Cocoa Jonathon Mah Apr 23, 23:53
mlRe: Java vs. Objective-C for Cocoa Thomas Davie Apr 23, 23:58
mlRe: Java vs. Objective-C for Cocoa Marcel Weiher Apr 24, 00:13
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 24, 00:30
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 24, 00:38
mlRe: Java vs. Objective-C for Cocoa Keith Ray Apr 24, 05:08
mlRe: Java vs. Objective-C for Cocoa Zacharias J. Beckm… Apr 24, 06:18
mlRe: Java vs. Objective-C for Cocoa Zacharias J. Beckm… Apr 24, 06:38
mlRe: Java vs. Objective-C for Cocoa Todd Blanchard Apr 24, 08:36
mlRe: Java vs. Objective-C for Cocoa Marcel Weiher Apr 24, 10:41
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 24, 11:50
mlRe: Java vs. Objective-C for Cocoa Thomas Davie Apr 24, 12:24
mlRe: Java vs. Objective-C for Cocoa Marcel Weiher Apr 24, 13:04
mlRe: Java vs. Objective-C for Cocoa Ondra Cada Apr 24, 15:55
mlRe: Java vs. Objective-C for Cocoa Thomas Davie Apr 24, 16:43
mlRe: Java vs. Objective-C for Cocoa Todd Blanchard Apr 24, 17:54
mlRe: Java vs. Objective-C for Cocoa Keith Ray Apr 24, 18:00
mlRe: Java vs. Objective-C for Cocoa Jonathon Mah Apr 25, 01:39
mlRe: Java vs. Objective-C for Cocoa Roarke Lynch Apr 25, 04:58
mlRe: Java vs. Objective-C for Cocoa Scott Ellsworth Apr 25, 20:23