I found this useful when creating commercial frameworks for VAST. For instance, in the printing framework, I used the idea of a turtle (from turtlegraphics) to create pages. All the turtle commands - turn(50) etc - were public but the code that actually created the printing code was all private. Hence purchases knew not to touch the private methods.
David > On 18 Aug 2021, at 14:31, Esteban Maringolo <emaring...@gmail.com> wrote: > > Hi Noury, > > In Dolphin Smalltalk and in IBM/VA Smalltalk, methods can be private, > it's a special attribute of the CompiledMethod, so the visibility > doesn't depend on a category name convention, and you can have both > public and private methods sharing a single category. I used that > attribute extensively in the previously described dialects, and it led > to good method categorization, in the case of Dolphin, it had the nice > thing of adding "Private - ..." to the method comment when you toggle > a method as private. > > I'm fine with the current state of everything being public, but if we > were to have that public/private distinction that would be the > simplest solution, having a <private> pragma could also work, but I > think that in terms of performance it could impact the lookup. I don't > know, however, if that is what the original request was after. > > Best regards, > > Esteban A. Maringolo > > On Wed, Aug 18, 2021 at 9:47 AM Noury Bouraqadi <bouraq...@gmail.com> wrote: >> >> Hi Esteban, >> >> Which first "class attribute" are you referring to? Is it a pragma? Can you >> provide an example please ? >> >> Thanx >> Noury >> >> On Aug 17 2021, at 10:31 pm, Esteban Maringolo <emaring...@gmail.com> wrote: >> >> I don't understand the request? >> >> Wouldn't tagging methods as private (as a first class attribute, and >> not only its category) be enough? >> >> What you ask for seems to be a splitted method dictionary of some sort. >> >> Having first class private methods would save you from autocomplete >> selector "pollution" of private methods. >> >> Regards! >> >> Esteban A. Maringolo >> >> On Tue, Aug 17, 2021 at 5:14 PM Craig Johnson <cr...@hivemind.net> wrote: >>> >>> Hi All, >>> >>> >>> Just a newb off-the-wall question. >>> >>> Is there any good reason why we can't create a true private method in a >>> Pharo class by putting that method inside an instance or class variable >>> as a lambda (block). >>> >>> >>> This would reduce one of my biggest bugbears with Pharo, namely the >>> pollution of the global namespace with every single message name in the >>> entire system. >>> >>> >>> >>> Craig