Re: Define consistent and standard

[email protected] Fri, 11 Aug 2000 15:51:30 +1000
Newsgroups perl.perl6.stdlib
Message-ID <[email protected]>
On Mon, Aug 07, 2000 at 05:39:02PM +0200, Bart Lateur wrote:
>
>>* Hash names should be written so that looking up an element reads clearly:
>>	$email_address{Skud} reads as "the email address of Skud"
>>* Hashes with scalars as values should have singular names:
>>	my $address = $email_address{Skud};
>>* Hashes with arrayrefs or hashrefs as values should have plural names:
>>	my @addresses = @{$email_addresses{Skud}};
>
>I can relate to that.
>
>But those two groups of rules contradict each other. Or, do yo want
>$email_address{Skud} to be an element of the hash %email_addresses?

What I was trying to get across was that if you're storing more than one
email address per person, you might use %email_addresses and therefore
$email_addresses{Skud}, whereas if you're limiting it to one email
address per person, it would be $email_address{Skud}.

K.

-- 
Kirrily Robert -- <[email protected]> -- http://netizen.com.au/
Open Source development, consulting and solutions
Level 10, 500 Collins St, Melbourne VIC 3000
Phone: +61 3 9614 0949  Fax: +61 3 9614 0948  Mobile: +61 410 664 994