Problems with ONEARGCHECK and TWOARGCHECK



Your are right. It is not worth for the argument check to get much more trouble
at other places.

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: robert.dodier at gmail.com [mailto:robert.dodier at gmail.com] 
Gesendet: Samstag, 26. Juli 2008 17:22
An: Dieter Kaiser
Cc: maxima at math.utexas.edu
Betreff: Re: [Maxima] Problems with ONEARGCHECK and TWOARGCHECK

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