KCP feedback (ii)

Stephane Ducasse ducasse at iam.unibe.ch
Mon May 5 09:49:55 UTC 2003


Hi daniel

>>> About SystemNavigation - it has a nice comment that does answer some 
>>> of
>>> the questions I had, but can you say something about how it's 
>>> supposed
>>> to fit into everything? for example, why all the similar
>>> implementations
>>> of self systemNavigator and not one implementation in Object (wait!
>>> don't shoot!) in a class extension? it's not very clear in what case
>>> you'd need state for this bunch of utility methods, so what examples
>>> did
>>> you have in mind when you made them instance side?
> Still would be glad for answers to the rest of these... :-)

For the instance side, we got a long discussion with roel about that 
and the idea
was that we could have multiple systemNavigation in the future. While 
for other
aspects of SystemDictionary we will have clearly class side methods.
But this is really a important question were we see the limit of OOP.

> [Why not use class extensions]
>> Because right now we do not have a good way of dealing with class
>> extensions. As soon as
>> we will get a real package notion this will be easy to fix. But may be
>> we should do that now.
>> I did not discuss this point with other.

> The DVS method-category-name-convention is a hack, but it works.
> Furthermore, PackageInfo itself and SpaghettiTracer provide some query
> tools that are aware of these class extensions. I think that anyone
> refactoring the image now should seriously consider using this kind of
> class extensions. It might not be pretty, but it's better than making
> the code indirect because it can't be put into the correct class.

I agree with the use of extensions. This is one of the most powerful 
open aspect of Smalltalk. We will look at it when we will need them.

However in the case of systemNavigation I do not see why I would put 
them in class
extension on Object. The idea behind the core cleaning is to remove 
dependency
and build layer around the core, so systemNavigation is really a layer 
on top for UI or global queries as such it is better to add it on the 
tools that use it than to add a global dependencies even via class 
extension. The fact that I load or not CodeBrowser should not
imply that all the objects depends now from SystemNavigation. I see 
class extension as a
really powerful way to add method in a packageable way but we should 
pay attention
about the consequences of adding dependency.

If you check where I was forced to introduced systemNavigation you will 
discover that there is
a lot of dirty code there too. For example, SmartStream referring to 
UI, Utilities (;)). In Dictionary because we use subclassing to 
represent namespaces ;)
So besides them I got a really could reuse for all the tools sharing 
stringHolder.

I hope I was clear.

Stef



More information about the Squeak-dev mailing list