On 7/4/05 at 1:32 PM, [EMAIL PROTECTED] (Mark Fuller) wrote:

> I understand that the purpose of the "param" method is to give me a
> way to store variables in $self without potentially colliding with
> C::A's use of the same name.
> 
> If that's correct, wouldn't it be easier just to choose a naming
> convention within C::A (perhaps a prefix: "__C_A__") and document
> that users should not refer to anything in $self with this prefix?
> Then I wouldn't have to go through the "param" method to safely use
> store my variables in $self?
> 
> I mean, isn't $self as much mine as it is C::A's? Why should C::A
> have exclusive access to it and force me to use a method to get to
> it? C::A is well-defined with a fixed role. Why can't it namespace
> itself and let me access $self however I want (as long as I stay away
> from that namespace)?

Just speaking generally about OO, I always figure it's dangerous to
monkey with the object's underlying data structure. Might it change in
the future? Who knows. But I should be guaranteed that a method will
remain available and behave as discribed.

Always tempting, but stay out of the black box :-)

Regards,
Andrew

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to