From: Todd Benson Date: 2009-03-06T06:35:27+09:00 Subject: Re: Any solutions to Ruby's inconsistencies? On Thu, Mar 5, 2009 at 3:24 PM, Eleanor McHugh wrote: > On 5 Mar 2009, at 20:40, Todd Benson wrote: >> >> On Thu, Mar 5, 2009 at 10:52 AM, C. Dagnon >> wrote: >>> >>> Interesting... I hadn't learned about the *ect's. I have used collect >>> (never map, yuck), >> >> Hmm, let me think about that method name... you are "mapping" a set of >> things into another set (I'm using "set" for a simple group of >> things); "collect" makes much less sense to me. What exactly are you >> collecting? Probably just vernacular used in CS circles that I'm not >> aware of, but silly nonetheless. > > Collect makes much more sense to me than map as I'm collecting a bunch of > results and storing them in an array. But the great thing about Ruby is that > whichever makes sense, you can use it - and if neither makes sense you can > add your own alias :) > Agreed. But you are collecting a collection, which seems inane and illogical to me. You are, however, absolutely right about the fascinating flexibility of Ruby (though sometimes that thought is coupled with deplorable distain of an old codger for excessive use :) Actually, I'm not an old codger, but I do come from old-school DB design, so I guess that counts. I also come from a math background, so "map" and "transform" were common terms, never the verb "collect"; not even in engineering or physics. You don't "collect" a group of things. They are already collected. That would be sort of like using the verb "gather". Todd