in reply to Re: Dotted hash access
in thread Dotted hash access

I guess I really should have described the data set better. Every level of that tree is fully populated. I can't have a separate table of buildings, because those buildings are specific to the given location. In database terms, both the location and the building name are in the primary key. (I do have a separate table of buildings, but that's in a separate data structure and describes the features they have in common.) I guess "cost" was a bad example to use, since it's unclear why it would vary by location. My bad.

I guess what I'm saying is that I periodically run across cases where the data is fundamentally deeply nested, and I need to start over from a fairly high level frequently (so I can't just grab the nested hash out and pass it into the other functions, avoiding long lookup chains.) Admittedly, it's not a frequent occurrence, but configuration files and simulations seem to be typical examples.

Replies are listed 'Best First'.
Re^3: Dotted hash access
by castaway (Parson) on Nov 25, 2004 at 13:39 UTC
    I understand what you're trying to say, I still can't think of an actual use that wouldn't lend itself to splitting in this manner. It's just a design issue.

    C.