>>>>> "J" == Juerd  <[EMAIL PROTECTED]> writes:

  J> Hashes are full of convenience, and Huffman would be proud:
  J>     %hash.keys      %hash>>.key
  J>     %hash.values    %hash>>.value
  J>     %hash.kv        zip(%hash.keys, %hash.values)

  J> One thing occurred to me: if hashes are worth all this, then why not
  J> abbreviate "keys" further to "k" (as in "kv"), and "values" to "v" (as
  J> in "kv"). This would allow us to rename "key" to "k" and "value" to "v"
  J> too, resulting in:

  J>     %hash.k         %hash>>.k
  J>     %hash.v         %hash>>.v
  J>     %hash.kv        zip(%hash.k, %hash.v)

huffman has its limits too. in general having single letter names for
anything is a poor idea. it makes it hard to search for, you limit it to
only one thing that can use that letter, it isn't always easy to
remember what a given letter is, etc. keys and values are short enough
and read much better. kv works because keyvalues is clunky and too
long. i wouldn't have minded .pairs or .each instead of kv. but alias
methods are easy to add. 

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to