Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DDC87431FBD for ; Tue, 5 Jan 2010 07:30:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MlkEsf6rm2dI for ; Tue, 5 Jan 2010 07:30:58 -0800 (PST) Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26]) by olra.theworths.org (Postfix) with ESMTP id AAC91431FAE for ; Tue, 5 Jan 2010 07:30:57 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by flatline.sindominio.net (Postfix) with ESMTP id 7DEB0348027; Tue, 5 Jan 2010 16:30:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at sindominio.net Received: from flatline.sindominio.net ([127.0.0.1]) by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IjHqg6yMjaY8; Tue, 5 Jan 2010 16:30:50 +0100 (CET) Received: from blackspot (rpollan-laptop.cern.ch [137.138.192.228]) by flatline.sindominio.net (Postfix) with ESMTPA id 63BEE34802C; Tue, 5 Jan 2010 16:30:49 +0100 (CET) Received: by blackspot (Postfix, from userid 1000) id 8B6058BCC3; Tue, 5 Jan 2010 16:33:32 +0100 (CET) Date: Tue, 5 Jan 2010 16:33:32 +0100 From: Ruben Pollan To: Carl Worth Message-ID: <20100105153332.GE9339@blackspot> References: <20091126202347.GA16654@blackspot> <1260364206-344-1-git-send-email-meskio@sindominio.net> <20091209132446.GC23878@blackspot> <877hsv6hbo.fsf@yoom.home.cworth.org> <87r5qnol78.fsf@yoom.home.cworth.org> <87pr67ofz2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dzs2zDY0zgkG72+7" Content-Disposition: inline In-Reply-To: <87pr67ofz2.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Added regress option to tags iterator X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 15:30:59 -0000 --Dzs2zDY0zgkG72+7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 19:16, Mon 21 Dec 09, Carl Worth wrote: > On Mon, 21 Dec 2009 17:23:55 -0800, Carl Worth wrote: > > New function Corresponds to existing function (if any) > > ------------ ----------------------------------------- > > move_to_first > > has_next has_more > > move_to_next advance > >=20 > > move_to_last > > has_previous > > move_to_previous > >=20 > > get get > >=20 > > The semantics of those all seem clear enough to me. They provide what's > > necessary for all three portions of a for loop, (in either direction), >=20 > Except that they don't. :-P >=20 > We don't want has_next and has_previous but something more like "has > current", (perhaps to pair with get_current?). Not sure if I understand that. Let's see if I understand well. move_to_first (or move_to_last) will put the iterator in the first (or last) valid item. move_to_next (and move_to_previous) will be able to reach an invalid item outside the list. Is it like that? In some implementations of iterators (like C++ STD) you can reach invalid i= tems only in one side of the list, at the end, but not at the beginning. Some pe= ople get use to this idea, but should not be a big deal to do it different. So you are thinking in a function has_current showing if the current item is valid. Am I right? > > The only downside is that the function names are a bit long in some > > cases, but I'm willing to live with that until someone comes up with > > better. >=20 > One option is to just drop the "move_ " prefix. I think that's a good option. The names of the functions are still clear li= ke that, and the original names are too long. PS: Sorry for the late reply, Christmas is a busy time. --=20 Rub=E9n Poll=E1n | jabber:meskio@jabber.org -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- =C9sta es la historia de una sociedad que se hunde y mientras cae se repite: hasta ahora todo va bien, hasta ahora todo va bien ... Pero lo importante no es la caida sino el aterrizaje. el odio --Dzs2zDY0zgkG72+7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAktDW8wACgkQGKOQ92SwNMKmnwCgkgXud/hxGjbVS0QFM+n0cRMB B4YAnjnmIXD2Y/bFTUNyV1P6vn4dZsUV =EzM/ -----END PGP SIGNATURE----- --Dzs2zDY0zgkG72+7--