On 28/02/19 5:23 AM, Richard O'Keefe wrote:
> It is surprisingly hard to keep categories consistent.�� If there is
> a way to say "here I am browsing method M in category G of class C,
> is there an ancestor of C that puts the selector of M in a different
> category?" I would love to know it.�� (Adding such a code critic to
> my Smalltalk is on the TODO list.)
>
Richard,
There is Browser>>#categorizeAllUncategorizedMethods that works this way
in Squeak but for uncategorized methods.
But then, a tag-set would be more useful than just single
categorization. It doesn't matter how accurate a category is, there will
always be someone who will find an equally justifiable reason for
putting a method into a different category ;-).
Or you could model it correctly. Formally define how packages extend classes and allow an arbitrary number of categories for any method.
It's not you would be doing anything new. VA Smalltalk has been doing that for more and a quarter of a century.
Is it possible to have a pragma or dummy method (say tags:) to list tags
that could be extracted to facilitate searches? It should not have any
runtime impact.
Regards .. Subbu