System organization as "documentation" [was Re: Documentation (...)]

Dwight Hughes dwighth at ipa.net
Thu Jun 10 03:41:34 UTC 1999


Peter Smet wrote:

>                           The problem with all these filters is that
> someone has to do the division:
> 
> complexity level #one will include these methods, #two will include ...
> etc, which is a real pain.
> 
> However, the system is smart enough to know for itself which methods
> are most important. 

Actually I was thinking of letting the system decide (at least for the
first cut). For the established classes an examination of selector usage
should work reasonably well -- selectors used only inside a class would
get marked "private" - the rest would be "public" (also, a selector
found to be public in one class should probably be public in its
subclasses (and superclasses, depending on where you start examining)).
If all selectors are "public" by default when first created, then the
style of creation could remain the same as now, until you want to define
your public interface (actually by defining your private interface - or
letting the system decide and tweaking the result if you're lazy).

Note: I'm just using the public/private separation as a strawman -
better, more useful, and more general schemes should not be too hard to
develop. Also, I would want to use the public/private/whatever status as
_additional_ info to add to the method protocol grouping -- eliminating
the present practice of having a "private" method protocol just to hide
the implementation methods in a class (you lose the level of meta-info
method protocols should provide about the basic purpose of the methods
they contain when you do this).

>                             You could use #sendersOf to determine how
> popular (important?) any particular method was. What I am suggesting
> is that the browser could be set to only examine the 5 most frequently
> used methods of a class, then 10, 15 etc. That way you could burrow
> down to any level of complexity.

That might be used as a way to organize the public interface -
displaying in descending order of frequency of use perhaps.

Of course, there are a number of ways to denote status of a selector --
showing all of a particular status in a particular color and sorting the
"colors" together, with the selectors sorted inside of their status
group, might cover a lot of needs (even for experts). The "filtering"
need not necessarily be "hiding" -- but more akin to staining a cell
specimen.

-- Dwight





More information about the Squeak-dev mailing list