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

Re: Superfluous actual arguments



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.

Marc