In article <20021112020739J.maki / rubycolor.org>,
TAKAHASHI Masayoshi  <maki / rubycolor.org> wrote:
>Hi all,
>
>One of the happiest things for me in RubyConf2002 was
>to meet readers of this summary.  Thanks again!

It was good to meet you too.

>
>
>And, this is a summary of ruby-dev ML in these days.
>
>
>---- ruby-dev #18613-18710 (2002-10-31 ... 2002-11-08) ----
>
>
>[ruby-dev:18651] Enumerable#zip
>
>  Matz implemented Enumerable#zip method, but he has not
>  decide its behavior yet.
>
>  Enumerable#zip is a method to mix some sequences(Array or
>  Object which has to_ary method). But, when length of
>  sequences are not same, the behavior is not clear.
>
>    a = [1,2,3,4]
>    b = [2,4]
>    a.zip(b) #=> ?
>
>   a.) a.zip(b) #=> [[1,2],[2,4],[3,nil],[4,nil]]
>
>   b.) a.zip(b) #=> [[1,2],[2,4]]
>
>   c.) a.zip(b) #=> [[1,2],[2,4],[3,nil],[4,nil]]
>       b.zip(a) #=> [[2,1],[4,2]]
>
>   e.) a.zip(b) #=> raise Exception (ArgumentError(?))
>
>  There is a discussion whether Enumerable#zip is appropriate or not.
>
>   ex.
>    * Enumerable.zip(a, b, c...)
>    * Array.zip(a, b, c...)
>    * [a, b, c..].zip
>

I guess I'm having a hard time seeing the usefulness of this (not saying 
it wouldn't be useful to someone).  Also, the name 'zip' is usually 
associated with compression so it could be doubly confusing.
Looks like option 'c' might be best.  

BTW: While were on the subject of adding operators to the Array class... I 
would find an operator to do the Cartesian product of 
the two arrays to be useful:
    a = [1,2,3,4]
    b = [2,4]

    a.x(b) #=> [[1,2],[1,4],[2,2],[2,4],[3,2],[3,4],[4,2],[4,4]]
    perhaps it could be:
    a*b ,but '*' is already defined on the Array class, however if the 
argument is an array instead of an integer then the Cartesian product 
could be done between the two arrays.

 Phil