private methods: your opinion wanted

David Farber dfarber at numenor.com
Wed Aug 28 04:55:40 UTC 2002


Doug -- Here is something to think about. Whenever I'm looking at a method that I think wants to be "private", it often turns out that that method actually wants to be "public" on /another/ class. So when you are looking at a "private" method, ask yourself if the method could be moved to another class, or maybe even moved to a new class.

So, I generally wind up with so few private messages that I don't bother worring about them.

david

At 12:26 AM 8/28/2002 -0400, you wrote:
>
>Squeak has a way to create private methods by using a method name with "pvt"
>at the beginning. About six methods actually use this, so it isn't common.  
>
>I am working on some code that I will release to the public.  I expect that
>the code will be used and modified by more than just myself. I think private
>methods would help with maintaining the code, and understanding it, especially
>for those who didn't write the code. But so few programmers have used private
>methods that I wonder if Squeakers care about it, or would find it distracting
>if they see it in one place and almost nowhere else in the image.
>
>
> So my question is, should I create public/private methods for this code?  
>
>Doug R.
>
>
--
David Farber
dfarber at numenor.com



More information about the Squeak-dev mailing list