Your data might be really complex, but it is all about perception and focus.

... and situation, and available time. Ever since I got the hang of using deeper/heavier data structures in perl, I've become more and more reliant on being able to handle more problems with less code in shorter amounts of time. Usually, the design is "simple" in the sense of optimizing the access to data for a particular activity: fewer looping blocks are needed overall, and the ones that are needed can be more compact, when the data are well organized for the task at hand.

I do worry sometimes about taking things too far, stuffing too many different things into one structure, and pushing the code to the point of being too obscure. But it often turns out to be a self-correcting condition -- if the data structure gets too complicated, so does the code that handles it, to the point that a self-respecting perl programmer will balk at that and start looking for a simpler alternative.

I agree that there should be a "shallower" threshold for drawing the line on depth/obscurity of data structures when building an OO design -- or at least when putting together an object's API.


In reply to Re: multi-tier collections & lack of modulization/OO by graff
in thread multi-tier collections & lack of modulization/OO by pg

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.