Graham Barr: > I know other languages call it zip, but personally I dislike that name > as zip() is commonly used with reference to compression. Although > I do not have a good alternative. Personally, I'd like join() to do this: @a = (1,3,5) ; @b = (2,4,6) ; @list = join(@a, @b) ; # (1,2,3,4,5,6) Likewise split could do this: (@a, @b) = split (2, @list) ; # @a = (1,3,5), @b = (2,4,7) Although this is ambiguous, because this also looks right: @list = ('a','b','c','d','e','f') ; (@a, @b) = split ('d', @list) ; # @a = ('a','b','c'), @b = ('e','f') # looks like the analog to splitting a scalar... ... although, perhaps the proposed want() could be used to tell split how many arrays it's shoving things in to, in which case the first version would: (@a, @b) = split (2, @list) ; # @a = (1) , @b = (3,4,5,6) and (@a, @b) = split (@list) ; # @a = (1,3,5), @b = (2, 4, 7) I'm probably, once again, in the minority as far as taste for terminology goes. :) Dirk Myers
- Re: RFC 90 (v1) Builtins: zip() and unz... Michael Fowler
- Re: RFC 90 (v1) Builtins: zip() and unzip() Tom Hughes
- Re: RFC 90 (v1) Builtins: zip() and unzip() Philip Newton
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() John Porter
- Re: RFC 90 (v1) Builtins: zip() and unzip() raptor
- Re: RFC 90 (v1) Builtins: zip() and unzip() raptor
- Re: RFC 90 (v1) Builtins: zip() and unzip() Stephen P. Potter
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() Stephen P. Potter
- Re: RFC 90 (v1) Builtins: zip() and unzip() Myers, Dirk
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jarkko Hietaniemi
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unzip() Nathan Wiger
- Re: RFC 90 (v1) Builtins: zip() and unzip() Jeremy Howard
- Re: RFC 90 (v1) Builtins: zip() and unz... iain truskett
- Re: RFC 90 (v1) Builtins: zip() an... Jarkko Hietaniemi
- Re: RFC 90 (v1) Builtins: zip(... iain truskett
- Re: RFC 90 (v1) Builtins: zip() and unzip() Damian Conway
- Re: RFC 90 (v1) Builtins: zip() and unz... Ariel Scolnicov
- Re: RFC 90 (v1) Builtins: zip() an... Jeremy Howard