[Newbies] Private metods as my*?

Blake blake at kingdomrpg.com
Fri Mar 2 01:26:29 UTC 2007

On Thu, 01 Mar 2007 17:21:44 -0800, Bert Freudenberg  
<bert at freudenbergs.de> wrote:

>>> There is also a private prefix that is even enforced by the compiler:  
>>> "pvt". It will only allow to send this to "self". This should only be  
>>> used in highly sensitive places, if at all.
>> Thanks, Bert.
>> So, that's a commonly held value in Smalltalk, i.e., privates should be  
>> severely limited if used at all? (I highly incline that way myself.)
> Well, usually they are just put in a "private" category. Also, a  
> selector like like "setX:" indicates that this is not a generic  
> accessor, because that one would be "x:".

Right: I was referring more to the concept of scope. It's more a matter of  
manners--or perhaps better, of being damn sure you know what you're doing,  
versus being restricted by the environment. (Hence, less use of the "pvt"  

More information about the Beginners mailing list