From: David Flanagan Date: 2008-06-10T04:11:38+09:00 Subject: [ruby-core:17168] Re: Enumerable::Enumerator#with_memo Akinori MUSHA wrote: > Hi, > > Earlier today I added a new instance method named `with_memo' to > Enumerable::Enumerator, but I'm not 100% sure if the name fits the > function. I'd like to try to revive this thread, if I can. This seems to me an important new method in a core part of the Ruby platform and I'm quite surprised that we haven't heard more debate from the usually more vocal ruby-core community. I don't like the name with_memo. Rick DeNatale proposed "returning" instead, and I like that better than with_memo. I've also proposed a separate, related method named "adding" that does not return its argument. (But that proposal isn't fully thought out, since I haven't convinced myself what a more useful return value would be.) Anyway, I suspect that the silence in this case means that the thread has been overlooked and not that no one really cares about the name of this method. This method has just been added into 1.9. I'd suggest that whatever name it has when 1.9.0-2 is released in a couple of weeks ought to be the final name. So we don't have much time to debate this and try to get it right. David > Some other options I could think of include: > > with: > - too general; may clash with a reserved keyword in future > > with_object: > - not bad, but too unspecific and a bit too long to use often > > with_obj: > - looks terrible when we have ObjectSpace.each_object > > with_accum: > - too specific > > > Anyone think of a better name? > > -- > Akinori MUSHA / http://akinori.org/