Re: Allegro and Sbcl disagree on no-primary-method behavior



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



Relevant Pages

  • Allegro and Sbcl disagree on no-primary-method behavior
    ... an around method which does NOT call call-next-method, ... no primary method? ... This returns 1 in allegro, and errors in sbcl. ...
    (comp.lang.lisp)
  • Re: Allegro and Sbcl disagree on no-primary-method behavior
    ... an around method which does NOT call call-next-method, ... no primary method? ... This returns 1 in allegro, and errors in sbcl. ...
    (comp.lang.lisp)
  • Re: more about DEFCLASS vs DEFSTRUCT
    ... I have prepared a battery of tests for the implementations: sbcl, ... ;;Allegro CL 8.1 Free Express Edition ... CLISP and Allegro doesn't make any difference at all. ... (defun check-struc-let-accessor (obj times) ...
    (comp.lang.lisp)
  • Re: changing binary extension with ASDF
    ... > Second: (To recall: my problem was that Allegro and SBCL both use ... I would very much prefer not having to tell Femlisp ... fundamentally different about Femlisp than every other lisp package ... Allegro and SBCL, they will already have solved this problem. ...
    (comp.lang.lisp)
  • Re: defadvice capability in [SB]CL?
    ... Maybe SBCL use the same mechanism to implement TRACE. ... fwrappers, so I think I'm out of luck for the moment, ... attributions to having gotten the idea from Allegro CL. ...
    (comp.lang.lisp)