.chars, .bytes, etc.

2005-09-24 Thread wolverian
Hi all, After some thinking it occured to me that the current way of defining .chars, .bytes and .elems (and whatever else there are) doesn't make any sense to me. In pugs at least they currently return the amount of units in question - in any context! Why not define .chars like this:

Re: .chars, .bytes, etc.

2005-09-24 Thread Juerd
wolverian skribis 2005-09-24 13:45 (+0300): Why not define .chars like this: Context Return value itemamount of units listunits themselves Agreed, of course. Originally I thought that .elems and .chars were symmetric and both should behave the same

k, v

2005-09-24 Thread Juerd
Hashes are full of convenience, and Huffman would be proud: %hash.keys %hash.key %hash.values%hash.value %hash.kvzip(%hash.keys, %hash.values) One thing occurred to me: if hashes are worth all this, then why not abbreviate keys further to k (as in kv), and values to

Re: k, v

2005-09-24 Thread Uri Guttman
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.kvzip(%hash.keys, %hash.values) J One thing occurred to me: if hashes are worth all this, then why

Re: k, v

2005-09-24 Thread Juerd
Uri Guttman skribis 2005-09-24 10:37 (-0400): 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.