1 Return-Path: <meskio@sindominio.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id DDC87431FBD
\r
6 for <notmuch@notmuchmail.org>; Tue, 5 Jan 2010 07:30:58 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id MlkEsf6rm2dI for <notmuch@notmuchmail.org>;
\r
11 Tue, 5 Jan 2010 07:30:58 -0800 (PST)
\r
12 Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26])
\r
13 by olra.theworths.org (Postfix) with ESMTP id AAC91431FAE
\r
14 for <notmuch@notmuchmail.org>; Tue, 5 Jan 2010 07:30:57 -0800 (PST)
\r
15 Received: from localhost (localhost.localdomain [127.0.0.1])
\r
16 by flatline.sindominio.net (Postfix) with ESMTP id 7DEB0348027;
\r
17 Tue, 5 Jan 2010 16:30:56 +0100 (CET)
\r
18 X-Virus-Scanned: Debian amavisd-new at sindominio.net
\r
19 Received: from flatline.sindominio.net ([127.0.0.1])
\r
20 by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new,
\r
22 with ESMTP id IjHqg6yMjaY8; Tue, 5 Jan 2010 16:30:50 +0100 (CET)
\r
23 Received: from blackspot (rpollan-laptop.cern.ch [137.138.192.228])
\r
24 by flatline.sindominio.net (Postfix) with ESMTPA id 63BEE34802C;
\r
25 Tue, 5 Jan 2010 16:30:49 +0100 (CET)
\r
26 Received: by blackspot (Postfix, from userid 1000)
\r
27 id 8B6058BCC3; Tue, 5 Jan 2010 16:33:32 +0100 (CET)
\r
28 Date: Tue, 5 Jan 2010 16:33:32 +0100
\r
29 From: Ruben Pollan <meskio@sindominio.net>
\r
30 To: Carl Worth <cworth@cworth.org>
\r
31 Message-ID: <20100105153332.GE9339@blackspot>
\r
32 References: <20091126202347.GA16654@blackspot>
\r
33 <1260364206-344-1-git-send-email-meskio@sindominio.net>
\r
34 <20091209132446.GC23878@blackspot>
\r
35 <877hsv6hbo.fsf@yoom.home.cworth.org>
\r
36 <87r5qnol78.fsf@yoom.home.cworth.org>
\r
37 <87pr67ofz2.fsf@yoom.home.cworth.org>
\r
39 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
40 protocol="application/pgp-signature"; boundary="Dzs2zDY0zgkG72+7"
\r
41 Content-Disposition: inline
\r
42 In-Reply-To: <87pr67ofz2.fsf@yoom.home.cworth.org>
\r
43 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
44 Cc: notmuch@notmuchmail.org
\r
45 Subject: Re: [notmuch] [PATCH] Added regress option to tags iterator
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Tue, 05 Jan 2010 15:30:59 -0000
\r
62 Content-Type: text/plain; charset=iso-8859-1
\r
63 Content-Disposition: inline
\r
64 Content-Transfer-Encoding: quoted-printable
\r
66 On 19:16, Mon 21 Dec 09, Carl Worth wrote:
\r
67 > On Mon, 21 Dec 2009 17:23:55 -0800, Carl Worth <cworth@cworth.org> wrote:
\r
68 > > New function Corresponds to existing function (if any)
\r
69 > > ------------ -----------------------------------------
\r
70 > > move_to_first <implicit in iterator creation>
\r
71 > > has_next has_more
\r
72 > > move_to_next advance
\r
74 > > move_to_last <none>
\r
75 > > has_previous <none>
\r
76 > > move_to_previous <none>
\r
80 > > The semantics of those all seem clear enough to me. They provide what's
\r
81 > > necessary for all three portions of a for loop, (in either direction),
\r
83 > Except that they don't. :-P
\r
85 > We don't want has_next and has_previous but something more like "has
\r
86 > current", (perhaps to pair with get_current?).
\r
88 Not sure if I understand that. Let's see if I understand well. move_to_first
\r
89 (or move_to_last) will put the iterator in the first (or last) valid item.
\r
90 move_to_next (and move_to_previous) will be able to reach an invalid item
\r
91 outside the list. Is it like that?
\r
93 In some implementations of iterators (like C++ STD) you can reach invalid i=
\r
95 only in one side of the list, at the end, but not at the beginning. Some pe=
\r
97 get use to this idea, but should not be a big deal to do it different.
\r
99 So you are thinking in a function has_current showing if the current item is
\r
102 > > The only downside is that the function names are a bit long in some
\r
103 > > cases, but I'm willing to live with that until someone comes up with
\r
106 > One option is to just drop the "move_ " prefix.
\r
108 I think that's a good option. The names of the functions are still clear li=
\r
110 that, and the original names are too long.
\r
113 PS: Sorry for the late reply, Christmas is a busy time.
\r
117 Rub=E9n Poll=E1n | jabber:meskio@jabber.org
\r
118 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
\r
119 =3D-=3D-=3D-=3D-=3D-
\r
120 =C9sta es la historia de una sociedad que se hunde
\r
121 y mientras cae se repite:
\r
122 hasta ahora todo va bien, hasta ahora todo va bien ...
\r
123 Pero lo importante no es la caida sino el aterrizaje.
\r
127 Content-Type: application/pgp-signature; name="signature.asc"
\r
128 Content-Description: Digital signature
\r
129 Content-Disposition: inline
\r
131 -----BEGIN PGP SIGNATURE-----
\r
132 Version: GnuPG v1.4.10 (GNU/Linux)
\r
134 iEYEARECAAYFAktDW8wACgkQGKOQ92SwNMKmnwCgkgXud/hxGjbVS0QFM+n0cRMB
\r
135 B4YAnjnmIXD2Y/bFTUNyV1P6vn4dZsUV
\r
137 -----END PGP SIGNATURE-----
\r
139 --Dzs2zDY0zgkG72+7--
\r