in reply to Re: Access Hashes of Hashes etc.
in thread Access Hashes of Hashes etc.
I often find it convenient to have a routine which claims to process all the records, which actually goes through the top-level keys and invokes another routine to processing the corresponding sub-nodes.
I prefer to have short subroutines in any case, under 20 lines if at all possible, so this makes it easier to understand what each routine does. It's not like the 80s, when invoking a subroutine was drastically slower than doing things inline.
It does generate a problem of coming up with names for several levels of subroutine: process_all_names(), process_one_name(), process_first_name(), process_last_name(), ...
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Access Hashes of Hashes etc.
by muba (Priest) on Sep 14, 2011 at 22:34 UTC |