Automatic selection of '--all--'

Swan, Dean Dean_Swan at Mitel.COM
Wed Dec 18 21:37:38 UTC 2002


While I'm all fired up....

	Method Categories and Class Categories are not part of the Smalltalk language!  They are user interface conveniences, and I generally just prefer to 'browse hierarchy' for classes and '--all--' for methods.  The categories create another completely unrelated organization of classes, which I find confusing because it has nothing to do with inheritance.  I may be the only one, but I just don't like the categories facility, and while I don't want others to be denied the choice, I want to be free to ignore categories and not use them if I choose.

	One could also argue that if your class has so many methods that you need method categories, that you should think about refactoring it into more than one class anyway.  This is, of course a philosophical/personal preference issue so I won't push the point, but IMO, most objects can be defined in a class hierarchy where an object only has a complex protocol due to inheritance and any given class has a fairly small protocol.

	An example completely contrary to this principle would be Morph, which I find to be just horrible in this respect - way too many methods.  If not for the method cache and hashed method dictionaries, method lookup for classes with so many methods would cause a noticeable performance hit.

					-Dean


> -----Original Message-----
> From: Travis Griggs [mailto:tgriggs at keyww.com]
> Sent: Wednesday, December 18, 2002 4:17 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: Automatic selection of '--all--'
> 
> 
> tblanchard at mac.com wrote:
> > Quick suggestion - why don't you toss up a quickie popup menu when
> > "all" is selected and make the user select a category 
> (including create
> > new).  Sort of like what you get when you've mistyped a 
> variable name
> > and you get a popup with a list of likely candidates.  That 
> would seem
> > to be the most likely solution to guarantee properly categorized
> > methods.
> > 
> > The problem with "as yet unclassified" is that folks often don't go
> > back to clean up.
> 
> Or, you could at least, just reduce the number of them. I 
> found that as 
> a rule, if a class defined the method 'initialize' in a 
> category called 
>   'initialize-release' I wanted subclasses to do the same. In fact, 
> often when writing a common method name, I found myself 
> asking "now what 
> category is it I'm supposed to do this in again?" The 
> solution (in VW) 
> was ConsistentProtocols (found in the open repository), which 
> basically 
> makes the classification of a method always defer to any superclass 
> categorization of the same method. With this (and the point 
> that John B 
> makes in his post), I don't even really pay attention to the protocol 
> list when coding any more. When I'm browsing/looking, I do, 
> but when I 
> write a method, I don't care. It's been very enlightening.
> 
> -- 
> Travis Griggs
> Key Technology
> One Man's Pink Plane is Another Man's Blue Plane
> 
> 



More information about the Squeak-dev mailing list