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

Re: Superfluous actual arguments

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

 * From: Marc Feeley <feeley@iro.umontreal.ca>
 | On 14-Apr-06, at 8:47 PM, soo wrote:
   >> | Unfortunately, if you add a rest parameter to foo (and bar)
   >> | the error checking is lost.  Good error checking is
   >> | important in the case of named parameters because you want
   >> | to catch any misspelling of the parameters.
   >> Can the exception for superfluous arguments be allowed because
   >> of that?  If default value is taken because of misspelling of
   >> the parameter, it is programmer's responsibility.  I don't
   >> understand why superfluous arguments are allowed in spite of
   >> absence of rest parameter.
 | I'm sorry, I don't understand what you are trying to say.
 | I'm guessing that you would like a duplicate parameter to be an  error.  I
 | expect erroneously duplicated parameters to be much less  frequent than
 | misspelled parameters, and that it is easier to find  that there is an
 | erroneously duplicated parameter.  On the other hand  there is a use case for
 | duplicate parameters, as I explained in my  previous message.  Moreover this
 | is how Common Lisp and DSSSL handle  duplicate parameters (i.e. it is not
 | considered an error).  I'm not  trying to innovate here.  Since one of the
 | goals of this SRFI is to  be compatible with DSSSL when possible, the only
 | deviation would have  to be motivated by a significant issue.  I don't find
 | that's the case  here.

I overlooked the sentence, "It is an error if the parameter name is not the
same as a variable in a <keyword formal>.".

Thank you for kind reply.

Joo ChurlSoo