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

Re^3: The Accessor Heresy

by dragonchild (Archbishop)
on Nov 28, 2005 at 19:02 UTC ( [id://512329]=note: print w/replies, xml ) Need Help??


in reply to Re^2: The Accessor Heresy
in thread The Accessor Heresy

Square isa Rectangle isa Polygon

Not quite. Square is both a Rectangle and a Rhombus, both of which are Parallelograms which isa Quadrilateral which isa Polygon. In addition, Square->is_regular_polygon() is true where none of the other classes mentioned in this listing can make that claim. is_regular_polygon() would be a method of Polygon.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^4: The Accessor Heresy
by Anonymous Monk on Nov 28, 2005 at 21:30 UTC
    Sure. I'm no great fan of object hierarchies (nor am I very good at them); I was just pointing out that it wasn't hard to come up with examples where the base classes were more generic and complicated than the specific instances that derived from them.
    --
    Ytrew

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found