in reply to Re^4: bless with => separated args
in thread bless with => separated args
My point was that $foo->new has confusing semantics. It should mean something like "create a new object based on $foo" not "create a new object of the same class as $foo". Who knows whether $foo->new creates a new, empty object of the same class or a complete copy of $foo. It's not clear unless you read the docs or the source code. I didn't say that I was confused, just that it was potentially confusing :)
Good OO programming practice is that class methods and object methods should be distinct. I think that it's a shame that common Perl practice seems to be to ignore that practice as it makes OO programming in Perl seem more complex than it needs to be.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: bless with => separated args
by Anonymous Monk on Aug 01, 2005 at 12:02 UTC |