Re: Allegro and Sbcl disagree on no-primary-method behavior
- From: Daniel Weinreb <dlw@xxxxxxxxxxxx>
- Date: Sun, 01 Jun 2008 12:09:17 GMT
Ken Tilton wrote:
Jim Newton wrote:Does anyone know what the behavior should be if a generic function has
an around method which does NOT call call-next-method, but there is
no primary method?
It seems that sbcl calls SB-PCL::NO-PRIMARY-METHOD which normally signals an error, but allegro calls the around method
(defgeneric foo (x))
(defmethod foo :around (x) 1)
(foo 1)
This returns 1 in allegro, and errors in sbcl. Any opinions
about which is correct behavior?
This is Lisp. If I do not call X, I better not get an error about X being undefined.
my2. kt
But you did call X. You called the generic function foo.
foo is defined. The problem is that the definition is
incomplete/invalid. So this does not break the invariant
that if you do not call X then it's OK for X to be undefined.
.
- Follow-Ups:
- Re: Allegro and Sbcl disagree on no-primary-method behavior
- From: Ken Tilton
- Re: Allegro and Sbcl disagree on no-primary-method behavior
- Prev by Date: Re: Allegro and Sbcl disagree on no-primary-method behavior
- Next by Date: Re: Allegro and Sbcl disagree on no-primary-method behavior
- Previous by thread: Re: Allegro and Sbcl disagree on no-primary-method behavior
- Next by thread: Re: Allegro and Sbcl disagree on no-primary-method behavior
- Index(es):
Relevant Pages
|
|