From: Akinori MUSHA Date: 2008-06-10T15:11:41+09:00 Subject: [ruby-core:17174] Re: Enumerable::Enumerator#with_memo --pgp-sign-Multipart_Tue_Jun_10_15:10:38_2008-1 Content-Type: text/plain; charset=US-ASCII At Tue, 10 Jun 2008 04:11:38 +0900, David Flanagan wrote: > 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.) I thought up the name `with_memo' by analogy to with_index, adding a memo object instead of an index. The problem would be that it doesn't say at all that it returns self. For `returning', the opposite would apply. It would be nice if there is a name that implies both. > 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. I suggest everyone with some interest in the method use it and write some piece of code, get hinted and come up with a better name. If the debate seems to reach nowhere, I will even think withdrawing the method itself before 1.9.0-2. -- Akinori MUSHA / http://akinori.org/ --pgp-sign-Multipart_Tue_Jun_10_15:10:38_2008-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkhOGt4ACgkQkgvvx5/Z4e6cBwCffKTIPj611CF8bBd242mhWl/0 sMQAn0rPZFgq9ByAbP5LN3ejATKEV9Sm =/AfR -----END PGP SIGNATURE----- --pgp-sign-Multipart_Tue_Jun_10_15:10:38_2008-1--