Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: OO, inheriting functions from other packages

by perrin (Chancellor)
on Jul 22, 2004 at 16:16 UTC ( [id://376637]=note: print w/replies, xml ) Need Help??


in reply to OO, inheriting functions from other packages

Getting access to functions is not what inheritance is for. Inheritance is used when you have a class that is just like another class except for some variations in behavior of specific methods. Most of the time, the relationship between classes is "foo has a bar" not "foo is a bar." When in doubt, don't use inheritance.
  • Comment on Re: OO, inheriting functions from other packages

Replies are listed 'Best First'.
Re^2: OO, inheriting functions from other packages
by sschneid (Deacon) on Jul 22, 2004 at 16:28 UTC
    Maybe 'inherit' was the wrong word to use. Semantics, schemantics! ;)

    -s.
      Semantics, schemantics!

      Semantics, indeed! It makes a very big difference whether you meant inheritance, or something else. Each approach has different pros and cons, so using one term when you mean another has major ramifications for any answers. I'm not trying to hammer you for making a mistake in terminology -- we all do that now and again -- but it is an important thing to keep in mind.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found