Re: Stupid Newbie Question
[email protected] ((Randal L. Schwartz)) 19 Nov 2001 11:47:43 -0800
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Organization | Stonehenge Consulting Services; Portland, Oregon, USA |
| Message-ID | <[email protected]> |
>>>>> "John" == John Rudd <[email protected]> writes: John> 1) Methods are always public John> 2) Variables are always private (and in this case that means that other John> instances may not view the instance variables of an object; I don't John> recall whether the class can see the ivars of its instances but I'm John> pretty sure it can't). No, an instance owns its ivars, so nobody touches it. However, the class for an instance can define a new method which of course acts "within" the instance. And there's always the system primitives used by the debugger (and for other reflection), with names like instVarAt: and instVarAt:put:. Anybody can send them! -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[email protected]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!