"Alexander Kellett" <ruby-lists / lypanov.net> schrieb im Newsbeitrag 
news:9b411145f76db3c8a017a89ebb9d5611 / lypanov.net...
> On Jan 28, 2005, at 7:00 PM, georgesawyer wrote:
>> I lack some comfort with 'inject', even after time: perhaps because it
>> asks us to pass the code for collapsing (an array of) objects, instead of
>> asking the objects to know how to collapse themselves: a known
>> object-programming principle. Collapse perhaps should be a module method
>> of no arguments, mix-inable to any class of objects having the '[]'
>> method.
>
> the main problem i've had with inject is the naming.
> to me it says 'destructive'. and thusly i'd expect
> the receiver and the argument to be exactly the other
> way around. however swapping them makes no sense as
> it forces the use of another temporary. thusly a
> change in name should be made :)
>
> haven't heard any better alternative yet however :/

#accum is the only name that fits slightly better than #inject although I'm 
sure one can come up with misinterpretations of that name also.  Anyway: 
#inject is quite complex so it takes some time to get used to the behavior 
regardless of how it's named.

<rant>
But: the search for a better name is wasted time IMHO.  Things are like they 
are and changes to base classes generally do far more harm than good (if 
something is seriously flawed that's another story of course).
</rant>

Kind regards

    robert