[notmuch] [PATCH] Added regress option to tags iterator
Ruben Pollan
meskio at sindominio.net
Wed Dec 9 14:01:33 PST 2009
On 12:08, Wed 09 Dec 09, Carl Worth wrote:
> On Wed, 9 Dec 2009 14:24:46 +0100, Ruben Pollan <meskio at sindominio.net> wrote:
> > Do you like to call them regress? Should I change that?
>
> I don't love the name, (since it's so close to the word "regression"
> which has a totally different meaning in software context). But I also
> don't have an immediate suggestion for an improved name yet either.
Me neither, but as I don't have any better idea I just use regress. But we can
try to come up with something better.
>
> > What about the functions notmuch_*_is_first? Is kind of reversed logic than
> > notmuch_*_has_more, the last are true when is not reach the limit but the
> > first ones are true when the limit is reached. But I think it make sense like
> > that.
>
> I'd like a more symmetric API here. Anyone have a favorite set of names
> for iterating a list in two directions?
Yes, but actually are a bit different somehow. When you advance the last
iterator you can reach is a non-valid (outside the list) iterator. When you
'regress' the iterator at the end is a valid iterator, I don't see the need on
get outside of the list like with advance.
So, maybe because of it have sense the functions notmuch_*_is_first. Anyway I
really don't mind, one or other. To change it is trivial. It's harder to find a
good pair of names.
--
Rubén Pollán | jabber:meskio at jabber.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
La felicidad no es hacer lo que deseas
es desear lo que haces.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20091209/687fa4f0/attachment.pgp>
More information about the notmuch
mailing list