private methods: your opinion wanted

Aaron reic0024 at d.umn.edu
Wed Aug 28 14:30:30 UTC 2002


On Wed, 28 Aug 2002, Karl Ramberg wrote:

> I think private methods usually are in the private category, and not
> necessary
> have a selector name indicating it's private.

I thought that was the convention too, but never tested to see if Squeak
actually made the private, rather than simply as a signal for people
browsing for the API not to use those methods.

After the original message was posted, I tried it out, created a
class-side method on a class, #pvtInspectMe, which simply does a ^ 'hello'
inspect.  I then tried calling it in a workspace with Object pvtInspectMe,
and Squeak told me that it was private, with a compilation error. That is,
it expanded to something like Object *Private methods cannot be called
like this.* pvtInspectMe.

Aaron




More information about the Squeak-dev mailing list