From: dblack@... Date: 2002-11-19T07:16:04+09:00 Subject: Re: ruby-dev summary 18711-18810 Hi -- On Tue, 19 Nov 2002, Hal E. Fulton wrote: > ----- Original Message ----- > From: > To: "ruby-talk ML" > Sent: Monday, November 18, 2002 9:19 AM > Subject: Re: ruby-dev summary 18711-18810 > > > > Hi -- > > > > On Mon, 18 Nov 2002, Yukihiro Matsumoto wrote: > > > > > map_with_index was rejected just because no one proposed its typical > > > usage. YANGI principle applied. > > > > Hmmmm.... I'll try to think of some examples. It certainly seems to > > me to be at least as useful as each_with_index, potentially (i.e., if > > it existed :-) > > I'd go so far as to say that map_with_index > does for map exactly what each_with_index > does for each. > > I do find it useful. > > It's used in scanf, David, isn't it? :) Almost, but in the end we didn't use it. I can't remember the whole sequence of events.... I definitely agree that map_with_index (or map_with_indices) is as deserving of existence as each_with_index. Not that each_with_index is itself terribly critical: $ grep each_with_index `find . -name "*.rb"` | wc -l 6 but still, mwi makes things symmetrical :-) David President, Citizens for MWI, Inc. -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav