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.


In reply to Re: The Accessor Heresy by Aristotle
in thread The Accessor Heresy by Roy Johnson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.