From: Rob Rypka Date: 2005-10-08T07:31:19+09:00 Subject: Re: select! not present but reject! is On 10/7/05, Mark Hubbart wrote: > Also, I'm not really advocating any action here. I'm just suggesting > that it would be a little weird for "select!" to be the exact opposite > of "reject!", since the Ruby definitions wouldn't stand up to the > English ones. select and reject (without the exclamation marks) are Ruby opposites, though. Nobody seems opposed to that. If I had two methods, Array#foo and Array#foo!, I would expect the definition of foo! to be: "Same as Array#foo, but modifies the receiver in place." Sometimes, the above leads to another (near) synonym (like delete_if and reject!), but the The return value should be the receiver, instead of a new array. To me, foo! doesn't mean finding a new meaning of the foo operation in a way that would be destructive, it means immediacy to the receiver (which in turn implies destruction). "Select these elements, but alter your contents and return yourself, instead of someone new." Anyways, there seems to be enough opposition to select! that Matz probably isn't going to add it. I give up the fight (even though I still believe I'm right). I'm going to have to learn to live with reject!ion (but not select!ion). Aside: I second the vote for Array#winnow :-) -- Rob