in reply to multi-tier collections & lack of modulization/OO

99% of the time, the fact that multi-tier collections of collections being exposed to a single module, points to poor modulization of code, or lack of OO design.
That's a pretty bold statement. Do you have anything to back up this claim? 99%? How large was your sample?
If the code happens to have a OO face, then it indicates lack of genuine understanding of OO.
Another bold statement. Please explain why this is.
As a matter of fact, 99% of the time, OO classes should only see one level of collection. The elements of the collection, whatever how complex they are, their internal structure should not be exposed to the class that holds the collection.
Oh? Why? It's not very interesting just to state opinions as facts, without giving any justification.
There is absolutely no reason for a person to believe that his/her data is complex enough and cannot be clearly contained in layers.
Yes, but that doesn't mean data shouldn't be stored in hashes of hashes, or arrays of hashes. Nor does it mean that OO is the answer. (In fact, considering that most Perl objects use a reference to a hash to store their state, you're even creating more layers of hashes of hashes of hashes of hashes if you go the OO world).
Naked complex data structure can easily create maintainance nightmares.
OTOH, the world has run for thousands of years using hierarchical storage systems. And a maze of twisty little classes, all different is easily created, and a maintainance nightmare.

Abigail

  • Comment on Re: multi-tier collections & lack of modulization/OO