FROM : Ondra Cada
DATE : Fri Apr 22 02:19:28 2005
Scott,
On 22.4.2005, at 2:01, Scott Ellsworth wrote:
>> More than that: in fact, it is not possible *at all* :))
>
> Actually, it is possible. I do this all the time with IDEA.
>
> If you add a parameter to a base class, it asks if you want it
> propagated to the implementations in all of the implementing classes.
> Similarly, if you change a method in an interface, it updates all the
> implementing classes, and vice versa. It also finds all usages of the
> method via instances of the class, subclasses, and via interfaces.
>
>> (Not even with Java, see reflection/NSSelector/action-target/first
>> responder stuff... And of course, even *considerably* less with ObjC
>> or another decent language.)
>
> You can certainly break reflection, but catching direct method calls
> covers a lot of ground. The majority of cases, in my experience.
Majority in Swing or similar low-level APIs; minority (or perhaps still
majority, but with a too big number of exceptions to be practical) in
Cocoa though. See below.
> Believe me, this makes life run a lot faster, and does reward typical
> usage of the Java type system.
The problem is that "typical Java type system" does not support things
like target-action paradigm, First Responder, KVC/KVO, bindings, and so
forth, and so forth (I don't really know, but I bet CoreData models
would fit this category too). Not speaking of HOM, which is not part of
Cocoa (alas), but which is *definitely* worth adding to your private
framework set :)
These tools make life *so much* faster you even don't have time to
think of this kind of re-factoring :))
More seriously: you can't have it both ways. Either you got strong
typing (which then allows semi-automatic re-factoring), or you got
hi-level metaprogramming. Whilst the former has its strong points, the
latter is *inifinitely* better.
---
Ondra Čada
OCSoftware: <email_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
DATE : Fri Apr 22 02:19:28 2005
Scott,
On 22.4.2005, at 2:01, Scott Ellsworth wrote:
>> More than that: in fact, it is not possible *at all* :))
>
> Actually, it is possible. I do this all the time with IDEA.
>
> If you add a parameter to a base class, it asks if you want it
> propagated to the implementations in all of the implementing classes.
> Similarly, if you change a method in an interface, it updates all the
> implementing classes, and vice versa. It also finds all usages of the
> method via instances of the class, subclasses, and via interfaces.
>
>> (Not even with Java, see reflection/NSSelector/action-target/first
>> responder stuff... And of course, even *considerably* less with ObjC
>> or another decent language.)
>
> You can certainly break reflection, but catching direct method calls
> covers a lot of ground. The majority of cases, in my experience.
Majority in Swing or similar low-level APIs; minority (or perhaps still
majority, but with a too big number of exceptions to be practical) in
Cocoa though. See below.
> Believe me, this makes life run a lot faster, and does reward typical
> usage of the Java type system.
The problem is that "typical Java type system" does not support things
like target-action paradigm, First Responder, KVC/KVO, bindings, and so
forth, and so forth (I don't really know, but I bet CoreData models
would fit this category too). Not speaking of HOM, which is not part of
Cocoa (alas), but which is *definitely* worth adding to your private
framework set :)
These tools make life *so much* faster you even don't have time to
think of this kind of re-factoring :))
More seriously: you can't have it both ways. Either you got strong
typing (which then allows semi-automatic re-factoring), or you got
hi-level metaprogramming. Whilst the former has its strong points, the
latter is *inifinitely* better.
---
Ondra Čada
OCSoftware: <email_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
| Related mails | Author | Date |
|---|---|---|
| Jeff Laing | Apr 19, 06:57 | |
| Andrew White | Apr 20, 02:34 | |
| Rick Kitts | Apr 21, 00:25 | |
| Ondra Cada | Apr 21, 00:45 | |
| Scott Ellsworth | Apr 21, 01:15 | |
| Rick Kitts | Apr 21, 01:40 | |
| John Stiles | Apr 21, 01:41 | |
| Dirk van Oosterbos… | Apr 21, 10:32 | |
| Rick Kitts | Apr 21, 14:12 | |
| Mark Dalrymple | Apr 22, 00:03 | |
| Ondra Cada | Apr 22, 01:45 | |
| Scott Ellsworth | Apr 22, 02:01 | |
| Ondra Cada | Apr 22, 02:19 | |
| John Stiles | Apr 22, 02:58 |






Cocoa mail archive

