bug-guile
[Top][All Lists]
Advanced

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

Re: `-' and zero arguments


From: Marius Vollmer
Subject: Re: `-' and zero arguments
Date: 06 May 2001 03:26:33 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Martin Grabmueller <address@hidden> writes:

>  guile> (/)
>  <unnamed port>:2:1: In procedure / in expression (/):
>  <unnamed port>:2:1: Wrong type argument in position 1: #<undefined>
>  ABORT: (wrong-type-arg)
> 
> I am not sure how to fix this, because of the generic function
> dispatch stuff.  Should there be a dispatch for a wrong number of
> arguments too, or just a call to SCM_WRONG_NUM_ARGS?

I fixed this by making SCM_WTA_DISPATCH_0 signal a `wrong num args'
error when the generic function hasn't been initialized yet.  I think
this is the right thing to do.

What I'm not sure about is: should we allow generic functions or
methods with zero arguments?  Is that useful?  You can have exactly
one method for the zero argument case.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]