Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Inheritance, just say no! Read the traits paper!

by tilly (Archbishop)
on Aug 04, 2006 at 10:51 UTC ( #565633=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Inheritance, just say no! Read the traits paper!
in thread Inheritance: the root of the problem

Those similar questions emphasize different things, so will lead you to different answers.. And they go hand in hand with the third essential question, which is, What are the problems that inheritance causes?

The key to understanding all three is that inheritance is an imperfect mechanism for turning an ontology into well-factored code. Debates over what kind of inheritance mechanism to use come down to debates over how rich we'll allow our realizable ontologies to become (noting that richness brings both benefits and drawbacks), how efficient we wish the implementation to be, and where we wish to place surprises for the unwary programmer. (One of the tradeoffs is that the richer we allow the ontology to become, the more surprises we wind up with.)

It is, to say the least, highly unclear what the optimal tradeoff is. In fact it is apparent to me that the optimal tradeoff is different in different situations, and is again different for different programmers. Therefore beyond vague generalities (like the ones I give above), a real discussion of this problem needs to be informed by concrete examples. Certainly trying to answer it in perfect abstract generality is bound to fail.


Comment on Re^5: Inheritance, just say no! Read the traits paper!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-09-21 04:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls