tamaguchi has asked for the wisdom of the Perl Monks concerning the following question:

Is there a special name for the überkeys in a hash of hashes? I mean those keys which are keys to the hashes. Thank you for your answer.

Replies are listed 'Best First'.
Re: Question about HOH
by GrandFather (Saint) on Feb 19, 2006 at 22:33 UTC

    I don't think there is a formal name for such keys. A useful name would depend on context as much as anything else. For example, if the containing hash comprised a set of jobs then job key would be appropriate. If the containing hash contained a set of game nodes then room key might be appropriate. For a generic hash I'd tend to use primary key. The bottom line is, do what makes sense in your context to convey the intended usage to anyone reading your code.


    DWIM is Perl's answer to Gödel
Re: Question about HOH
by swampyankee (Parson) on Feb 20, 2006 at 03:20 UTC

    I just call them "keys" and call the keys in the subordinate hashes "subkeys" recursively, so I may have keys, subkeys, and subsubkeys.

    First-tier keys is an idea; in the spirit of a good (non-Soviet) poll, I'd like to nominate "master key".

    emc

    " When in doubt, use brute force." — Ken Thompson
Re: Question about HOH
by EvanCarroll (Chaplain) on Feb 20, 2006 at 01:50 UTC
    I hereby coin them "First-tier keys."


    Evan Carroll
    www.EvanCarroll.com