[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>
 * Date: Fri, 14 Apr 2006 12:31:37 -0400
 * Subj: Re: Superfluous actual arguments
  | On 14-Apr-06, at 11:15 AM, Joo ChurlSoo wrote:

  >> I think it is better that foo has rest parameter to consume
  >> the redundant arguments even if the rest parameter is not
  >> used in the definition of the procedure.  Even though it has
  >> rest parameter, such a function is possible.  And it seems
  >> to be a more clear syntax.

  | 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.

--
Joo ChurlSoo