From: Devin Mullins Date: 2005-10-09T02:55:37+09:00 Subject: Re: bang methods David A. Black wrote: > Heavens -- I think we all knew that already :-) There's one that I > don't think you included: Tempfile#close! which closes and unlinks the > file. Yeah, I just used ObjectSpace, so it didn't pick up any stdlib stuff. That was pretty stupid of me, but like I said, it was late, and I needed sleep. > One reason I think it's useful to remember the real meaning of ! is > that gives one a potentially useful tool to use in one's own classes. > I don't know how many people actually write bang methods. I've done > it once or twice. Point. I have never written a bang method. May I hang my head in shame. :P David A. Black wrote: > Anyway.... at the risk of getting meta-meta-meta, I'd like to suggest > that discussing details of things like method names (in this case, > including Matz indicating that he was interested in what people think) > is actually not "stupid". We're just lucky that Matz pays attention > to details like this, over and over again year after year. It's that, > and not a deterministic, mechanistic "Well, X does this, so Y has to > do it" logic, that makes Ruby so beautiful. 1. Agreed; attention to detail is what helped make Ruby so *tear* beautiful. 2. "Well, X does this, so Y has to do it" is just another aesthetic. In this case, I think it applies to me, but to each his own. 3. Indeed, you're right. It's more important to have a small set of cohesive and perfect doohickeys than a large set of jumbled and POS ones. So, fine, let us continue the select! discussion.... I say we name it select! and alias as keep! -- that way, somebody ri'ing it will be able to infer its meaning the English way, and somebody not ri'ing will be able to infer its meaning from the parallels already drawn in 90+% of the core bang methods (where x.foo! _=_ x = x.foo... sort of). Devin