develooper Front page | perl.perl6.language | Postings from May 2001

RE: properties

Thread Previous | Thread Next
From:
Austin Hastings
Date:
May 23, 2001 13:07
Subject:
RE: properties
Message ID:
20010523200748.78965.qmail@web12308.mail.yahoo.com

--- Garrett Goebel <garrett@scriptpro.com> wrote:
> Then what's the use of using object methods to override properties? 
 

It's funny that the discussion should go this way. From way back in the
beginning, I got the impression that properties were temporary hacks,
and object methods would be the designed-in thingys.

That being the case, wouldn't properties be the slow, inefficient way
to hack in something that could eventually be replaced by extending the
class?

Thus, if 

Dog::Bark()

then maybe

my Dog $spot is can({ Bark => false, Meow => true }); # Trangenus
dog...

And the property temporarily overrides the method. (After all, the
property is a hack, the method is designed in...) 

I do agree that properties should share a namespace with SOMETHING.
After all, if you just want an orthogonal sticky-note capability, then
write a module. (Use a hash of references or something...) 

=Austin


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About