Subject: Problems with ONEARGCHECK and TWOARGCHECK
From: Robert Dodier
Date: Sat, 26 Jul 2008 09:22:14 -0600
On 7/26/08, Dieter Kaiser <drdieterkaiser at web.de> wrote:
> Because I am interested to make the code sure for Maxima Users I have try to
> implement the Maxima User function for the Exponential Integrals with defmspec.
Hmm. Unless there was some other reason for writing the
functions in questions as defmspec's, I recommend pretty strongly
against doing it just to test the number of arguments.
> The problem with the wrong number of arguments arise in all function which are
> directly coded as Lisp functions. Should this be changed like above e. g. for
> the Bessel functions or Airy functions to have a more correct and predictable
> behaviour of the functions?
No. Changing from defun to defmspec has some serious consequences,
which would require reworking a substantial amount of code, and
obfuscate every function which is so modified. Working around GCL's
lack of error checking doesn't balance the trouble it would cause.
If counting the number of arguments is really important, maybe
someone should patch GCL instead.
best
Robert Dodier