From: "trans. (T. Onoma)" Date: 2004-09-21T05:48:48+09:00 Subject: Re: Array#index block and rdetect On Monday 20 September 2004 04:24 pm, Robert Klemme wrote: > There is no transformation under the hood - neither technical nor > conceptual: Hash#each just presents all key value pairs in some completely > contingent order. No special order "has imposed upon it". Sounds like a contradiction in terms to me: "some completely contingent order" != "special order"? It's still order either way. Nonetheless, even though a Hash by definition has no order, I doubt anything in a computer system lacks for order ;) > > So, I agree with you. I just think the word 'index' is the wrong word, > > and source of much the "confusion". If it's really needed the word > > 'enumerator' > > would be better. > > > > each_with_enumerator{|a,e| ... } > > > > (Or perhaps just 'enum' for short) > > IMHO not. An enumerator is somthing that does the enumeration or helps > with it. #each_with_key is much better. Sorry, guess I wasn't clear enough. I didn't mean the per class methods; rather the common Enumerable#each_with_index method, i.e. giving it a new name. But David seems to like #each_with_counter anyway, which is fine with me. T.