logo       

Re: private methods: your opinion wanted: msg#01270

lang.smalltalk.squeak.general

Subject: Re: private methods: your opinion wanted

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





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise