From: Jacob Fugal Date: 2005-10-08T08:01:30+09:00 Subject: Re: select! not present but reject! is On 10/7/05, David A. Black wrote: > On Sat, 8 Oct 2005, Jacob Fugal wrote: > > > 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. > > > > I'll concede that, but IMNSHO consistency between the non-bang and > > bang versions seems more important. > > The most important thing, though, is that every method name be > appropriate. If select! ("dangerous select") is the best way to > communicate the "delete unless..." process, then it's right. If not, > then not. It's reasonable to expect that a/b == a!/b! -- but the > existence of a, b, and a! doesn't mean that b! is a good method name > for the inverse of a!. We can agree on this, I suppose. Though I, personally, would like select! to be the opposite of reject!, I don't need it -- as long as there is *something* that's the opposite of reject!. Maybe keep!, retain!, keep_only!, restrict! (or winnow!). Most of my resistance was to the idea of having select!, but with a function that wasn't converse to reject!. Reading more carefully through past posts, I see now that you didn't mean select! should exist with the alternate meaning, but that the possible alternate meaning makes select! a bad naming choice. I don't quite agree on that, but in the name of civility, we can just drop select! from the discussion altogether and begin thinking of other names for the converse of reject!. Sound good? :) Jacob Fugal