Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

•Re: Re^7: It's a dog, but what kind? (polymorphism , in Perl OO) (alternative?)

by merlyn (Sage)
on Mar 24, 2004 at 16:25 UTC ( #339453=note: print w/replies, xml ) Need Help??

in reply to Re^7: It's a dog, but what kind? (polymorphism , in Perl OO) (alternative?)
in thread It's a dog, but what kind? (polymorphism , in Perl OO)

And tye, back at ya. Did you understand the responses you got to that posting, or the thread in this posting?

The "alternative" is the simple approach:

sub new { my $class = shift; my $self = { ... }; bless $self, $class; }
None of the extra cut-n-pasted stuff to make $instance->new do anything in particular, because as I said in my quoted item above, it's wrong to two-thirds of the audience, and therefore is dangerous.

If that's confusing to you, I wish you could say what you're missing in a different way, because I'm not getting it.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^9: It's a dog, but what kind? (polymorphism , in Perl OO) (!conveyed)
by tye (Sage) on Mar 24, 2004 at 16:55 UTC

    Yes, you aren't getting it (on at least two counts, it appears). Yes, I understood your response and even responded to it. I linked to where I explain why I consider the alternative above to be unacceptable (it makes a simple mistake hopelessly confusing).

    I wasn't particularly terse in my explanations so I won't rehash them further (I doubt I'd be successful in conveying the points to you based on how completely I've failed so far). Maybe some other time we'll be closer to the same "wavelength".

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://339453]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-06-25 06:06 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (133 votes). Check out past polls.