Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: The Accessor Heresy

by Roy Johnson (Monsignor)
on Nov 28, 2005 at 17:56 UTC ( [id://512305]=note: print w/replies, xml ) Need Help??


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

You're suggesting that there are no such things as conceptual properties. You are wrong. Calling set_area should conceptually set the area of whatever object it is. And that "area" that is being set is a thing, which (in OO programming) means you implement it as an object.

Furthermore, the Area->set method of a sub-object can do absolutely anything the set_area property can do. It is every bit as abstract, it just corresponds better to the suggested model. Notice that in my example, both Area and Radius operate on the radius value. They do not have their own independent set of data; the radius value is owned by the Circle object.


Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found