Bradley Lucier wrote: > (Puts math professor hat on ...) > > In mathematics, statements about the (nonexistent) elements of the > empty set are taken to be true; such statements are called "vacuously > true". "All witches are green" => #t; "all dragons are over 6 feet > tall" => #t; "all dragons are under 6 inches tall" => #t. > > In that context, all the comparison operators should return #t when > given zero or one arguments (if an implementation wants to make that > extension), as there are no pairs to compare. Gambit checks to see > that a single argument is indeed real, and throws an exception > otherwise. > Mathematics have brainwashed me, so I remember I was puzzled when I found put < didn't return #t on the empty input in all implementations [I mean, + was behaving as expected, so why not < ?]. I have mellowed due to the catch phrase "catch errors early". When < occurs in literally in code with 0 or 1 argument, odds are that the programmer made a typo. Therefore it makes sense to signal an error in these cases. Some would prefer style warnings instead of errors, but in the end it boils down to a matter of taste.
-- Jens Axel Søgaard _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
