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

Re: The Accessor Heresy

by Aristotle (Chancellor)
on Nov 29, 2005 at 04:11 UTC ( [id://512495]=note: print w/replies, xml ) Need Help??


in reply to The Accessor Heresy

But… what’s the the point? And… what are you saying? I don’t understand.

Are you suggesting that all properties are objects in their own right, if you squint at them the right way, so you should make them all objects? Then that would be architecture astronautics.

Or are you suggesting that an object which, in addition to the rest of its interface, has do_foo_with_bar, do_baz_with_bar, do_quux_with_bar, do_qux_with_bar, put_bar_in_frobnitz and take_bar_from_frobnitz should instead have-a Bar instance with the respective do_foo, do_baz etc methods? Then that would be plain old good OO design, and not much to make a commotion out of, assuming you don’t layer too deeply and paint yourself in a Demeter-ish corner.

Your example does nothing to help your argument. A Circumference is not an abstract concept that exists in a vacuum. It is always associated with a closed curve of some sort, and so are Radius and Area. Further, these properties are not independent of each other. If I saw your interface in real code I’d consider it horrible design.

Your example seems to suggest the architecture astronautics interpretation. That means you are either actually wasting your time thinking about abstractions of abstractions, or you picked a really awful example that doesn’t illustrate anything useful.

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found