[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arity failures

This page is part of the web mail archives of SRFI 102 from before July 7th, 2015. The new archives for SRFI 102 contain all messages, not just those from before July 7th, 2015.

On Fri, 2009-11-13 at 11:16 -0800, Per Bothner wrote:
> On 11/13/2009 10:54 AM, Thomas Bushnell BSG wrote:
> > So "passing" an arity check doesn't mean that the number of arguments
> > you pass is correct, as Dybvig's already noted.
> >
> > Also, "failing" an arity check doesn't mean that you will get any kind
> > of error or exception as a result.
> Arity is useful as *part of* an implemention's error-handling.
> I.e. first you check if there are too few or too many arguments,
> and *then* check the argument types.

Of course, many implementations have this thing under the hood called
"arity", and they check it for various purposes.  But "arity" is not
something the Scheme specification knows about, unless it is simply what
is defined by the defining lambda expression.  (And, if that's what it
means, then my two-value technique is fully sufficient.)