develooper Front page | perl.perl5.porters | Postings from May 2003

Re: Can I OVERLOAD the assignment operator? Please???

Thread Previous | Thread Next
John Peacock
May 23, 2003 07:04
Re: Can I OVERLOAD the assignment operator? Please???
Message ID:
Dan Sugalski wrote:
> What I'm in favor of is getting overloading and tying working together. 
> I still think the two should remain separate, with assignment living in 
> the tie part. I don't have the tuits to throw at it, unfortunately.

I'm not sure how that would work.  Would you tie the blessed object or bless the 
tie?  The OO interface (overloading) has to be dominant, so that the correct 
method gets called with the correct object[s].

FETCH could naturally be mapped to numify()/stringify() based on context, I 
suppose, but the overloading already does that now.  STORE is the only piece 
missing from the possible overload methods.

Would you be more favorably inclined towards an overload::Tied module which 
added a Tie-like interface to overloaded objects?


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About