[Newbies] Private metods as my*?
bert at freudenbergs.de
Fri Mar 2 01:21:44 UTC 2007
On Mar 2, 2007, at 1:56 , Blake wrote:
> On Tue, 27 Feb 2007 13:24:25 -0800, Bert Freudenberg
> <bert at freudenbergs.de> wrote:
>> I've never seen a "fr" prefix, and seldomly a "my". To emphasize
>> privacy, "private" seems to be the most common prefix (just check
>> a regular image).
>> 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:".
- Bert -
More information about the Beginners