* Sorting predicate names
@ 1996-01-11 9:40 Lars Magne Ingebrigtsen
1996-01-12 17:38 ` Sean Lynch
0 siblings, 1 reply; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-01-11 9:40 UTC (permalink / raw)
The (thread) sorting predicates currently have names like
`gnus-thread-sort-by-number' and `gnus-thread-sort-by-subject', which
aren't all that descriptive.
To take `gnus-thread-sort-by-subject' as an example -- it takes two
threads, picks out the Subject headers, and compares them with
`string-lessp'.
How about changing the names to things like `gnus-thread-number-lessp'
and `gnus-thread-subject-lessp'? Then we could easily have
`gnus-thread-number-greaterp' and `gnus-thread-subject-greaterp' to be
reverse sorting predicates.
Or is this just even more confusing?
We would (of course) define the old functions to be aliases for the
new functions to preserve backwards compatability.
--
Lars Magne Ingebrigtsen * larsi@ifi.uio.no
(a red leaf that falls from the purple tree)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Sorting predicate names
1996-01-11 9:40 Sorting predicate names Lars Magne Ingebrigtsen
@ 1996-01-12 17:38 ` Sean Lynch
0 siblings, 0 replies; 2+ messages in thread
From: Sean Lynch @ 1996-01-12 17:38 UTC (permalink / raw)
I think I would find `gnus-thread-sort-by-subject' and
`gnus-thread-sort-by-subject-backwards' or `-reverse' or something
like that to be a bit less confusing. Unless it is desired to make
the sorting order always explicit? In most cases, what is meant by a
"forward" and "reverse" sort is known.
There may be cases, however, where the definition of forward and
reverse are ambiguous, in which case, I guess `-lessp' and `-greaterp'
would be fine, since it would allow us to construct functions to sort
using different comparison functions, and to name them in a manner
that is consistent with other sort functions.
--Sean
>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
Lars> The (thread) sorting predicates currently have names like
Lars> `gnus-thread-sort-by-number' and
Lars> `gnus-thread-sort-by-subject', which aren't all that
Lars> descriptive.
Lars> To take `gnus-thread-sort-by-subject' as an example -- it
Lars> takes two threads, picks out the Subject headers, and
Lars> compares them with `string-lessp'.
Lars> How about changing the names to things like
Lars> `gnus-thread-number-lessp' and `gnus-thread-subject-lessp'?
Lars> Then we could easily have `gnus-thread-number-greaterp' and
Lars> `gnus-thread-subject-greaterp' to be reverse sorting
Lars> predicates.
Lars> Or is this just even more confusing?
Lars> We would (of course) define the old functions to be aliases
Lars> for the new functions to preserve backwards compatability.
Lars> -- Lars Magne Ingebrigtsen * larsi@ifi.uio.no (a red leaf
Lars> that falls from the purple tree)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-01-12 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-01-11 9:40 Sorting predicate names Lars Magne Ingebrigtsen
1996-01-12 17:38 ` Sean Lynch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).