On Fri, 16 Feb 2001, Kenichi Komiya wrote:

> From: David Alan Black <dblack / candle.superlink.net>
> Subject: [ruby-talk:10915] Re: Making Hash from two lists
> Date: Fri, 16 Feb 2001 02:28:01 +0900
> 
> > >   Q1: Do you think this is worth including to core Ruby?
> > 
> > Yes.  I tend to think in terms of Array#to_hash more than
> > Hash#from_array, but perhaps both (?).
> 
> Beside the method naming, I choose to make it as Hash.map
> because:
> 
>   * It allows any Enuerable object for keys and vals.
>     (Not the case for Array#to_hash)
>   
>   * I think it should be a Hash's class method rather than an 
>     instance method of Hash.  Becausee it does not require 
>     existing Hash to operate.

I agree.  In fact, I think I'm regressing.  In some of the discussions
a couple of months ago, these points came up, as I recall, so I'm
actually taking us backwards, which is stupid.  Probably something
to do with poking my head up from grading exams to dash off letters
to ruby-talk....

Anyway -- possibly risking more of the same -- what about Hash.from
and Enumerable#to_hash?  


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav