[r6rs-discuss] Comparison procedures' number of arguments
Ray Dillinger
bear at sonic.net
Thu Oct 23 18:42:59 EDT 2008
Just a note....
Comparison procedures returning #f (or throwing exceptions) for
single and zero-arity cases would cause errors in code I've written
that sorts directories of files into order based on their timestamps.
The basic logic is, "while unsorted, do this." If one-file and
zero-file directories are never considered to be sorted, then the
code goes all infinite-loopey.
I've assumed that the predicates are true *unless* there is a pair
in sequence that violates the condition, because that seems to me
the obvious and only reasonable way for them to be defined. My
personal principle of least surprise is such that I've been
utterly amazed to hear people seriously arguing for different
views.
And this has made me go complicate and clutter my code (grr) to
guard against the astonishing and heretofore-unconsidered possibility
of language implementations where different views are in fact
implemented.
Bear
More information about the r6rs-discuss
mailing list