> Ken Dickey wrote:
> > Personally, I think that a mismatch between the expected number of
> > "arguments" to a continuation is like a mismatch to the number of
> > arguments to a function call -- it should raise an exception to alert the
> > system/programmer that there is a problem.
> >
> > I see the "less than 2 arguments" comparison case in the same way.  I.e.
> > my personal preference is that an exception be raised.   [This is a
> > different question than "What would a sensible result be in such a
> > case?".]

On Sunday 19 October 2008 10:58:13 Thomas Lord wrote:
> In general, deciding that an ordering predicate "expects" two or more
> arguments  expresses an expectation that is kind of arbitrary relative to 
the simplest  accounts of the underlying domains.   It is an "arbitrary 
restriction," allegedly  for the programmer's own good:  precisely the kind 
of thing we're taught to avoid.

Ah.  So 
  (define (foo? x . rest) #t)
  (foo? 3 4 5) ;=> #t
  (foo? 3) ;==> #t
therefore 
  (foo?) ;==> #t
because the base case of all predicates is #t and this is the least 
restrictive???

What about the principle of least surprise?

I really find it less surprising if the code does the (perhaps wacky) things I 
specify than I get "unspecified results".

-KenD

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to