inconsistent definition of "sort" (and what about stability?)



Stavros Macrakis <macrakis at alum.mit.edu> wrote:

   If P(a,b) is not true or false for some a and b, sort signals an error.
   
>From where do you infer this behavior?  It is _not_ something about
cl:stable-sort guaranteed by the ANS (assuming the Maxima call to sort
has not been rewitten to wrap the predicate to test for this).

On the other hand, in ANSI CL there are no possible objects which are
neither "true" nor "false", in the sense of "generalized boolean" which
is what the sort predicate is required to return.  Therefore the
provision would be meaningless.
   
   On Sat, Nov 19, 2011 at 20:28, Oliver Kullmann <O.Kullmann at swansea.ac.uk> wrote:
   
       Predicate should return true if and only if the first argument is
       strictly less than the second (in some appropriate sense).
      
       (It's sloppy in the sense that "appropriate sense" it not defined.)

"Appropriate sense" here means that sort predicate determines the
desired ordering.  That sense is opaque to and of no concern to sort
itself.