Squeak already has private method support (was Re: FW: Pressures for Substantially New Squeaks)

Mark A. Schwenk mas at wellthot.com
Thu Feb 18 15:35:39 UTC 1999


Peter Crowther wrote:
> 
> This also got eaten.
> 
>                 - Peter
> 
> > -----Original Message-----
> > From: Peter Crowther
> > Sent: Monday, February 15, 1999 12:49 PM
> > To:   'squeak at cs.uiuc.edu'
> > Subject:      RE: Pressures for Substantially New Squeaks
> >
> > Squeak also has such a convention.  Put private modules in a protocol
> > category entitled "private."  If you really desperately need to have
> > the compiler remind you of impinging upon private modules -- go ahead
> > and have the compiler do that for you.
> >
> > I have a requirement for enforced private (and protected) methods, and am
> > in the process of adding tweeks to the VM to catch calls made to them by
> > *any* means, including perform: and the Debugger simulations.  Watch this
> > space... --> <--.
> >
> >               - Peter

It appears that Squeak already has private method support.
Just begin your private method names with 'pvt'.
You can only send pvt* messages to self (note that this also means an instance
creation class method cannot directly send a pvt* message).

I'm not sure who implemented this. Perhaps Andreas Raab? Maybe the proud papa
of this code can step forward and add any more insights here.

Execute the following expression to see some of the relevant implementation:

	Smalltalk browseMethodsWhoseNamesContain: 'pvt'.

-Mark Schwenk





More information about the Squeak-dev mailing list