Christophe Rhodes | 1 Oct 2004 17:23
Picon
Picon
Favicon

Re: small mop compatability layer

marco <mb <at> bese.it> writes:

> The mopp package also exports the function
> SLOT-DEFINITION-DOCUMENTATION which while not strictly part of
> the MOP really should be and is implementened on most systems.

It surprises me slightly that you think that
SLOT-DEFINITION-DOCUMENTATION shouldn't be a generic function.

> IMPLEMENTATION - A keyword indetifying the implementation, one
> of: :OPENMCL, :SBCL, :CMU, :LISPWORKS.

> (let ((external-symbols '()))
>   (do-external-symbols (sym (find-package :it.bese.arnesi.mopp))
>     (push sym external-symbols))
>   (dolist (sym external-symbols)
>     (unless (provide-mopp-symbol sym #+openmcl :openmcl
>                                      #+sbcl :sbcl
>                                      #+cmu :cmu
>                                      #+lispworks :lispworks)
>       (warn "Unimplemented MOP symbol: ~S" sym))))

You could be slightly nicer to other implementations by doing
  ... (unless (provide-mopp-symbol sym (or #+openmcl :openmcl
                                           #+sbcl :sbcl
                                           #+cmu :cmu
                                           #+lispworks :lispworks
                                           :unimplemented))
        (warn ...))
and either provide a method on :unimplemented or a method on
(Continue reading)

Marco Baringer | 1 Oct 2004 18:27
Picon

Re: Re: small mop compatability layer

Christophe Rhodes <csr21 <at> cam.ac.uk> writes:

> marco <mb <at> bese.it> writes:
>
>> The mopp package also exports the function
>> SLOT-DEFINITION-DOCUMENTATION which while not strictly part of
>> the MOP really should be and is implementened on most systems.
>
> It surprises me slightly that you think that
> SLOT-DEFINITION-DOCUMENTATION shouldn't be a generic function.

on openmcl and lispworks it is. on other lisps it's a wrapper around a
generic function, what's to be gained?

> You could be slightly nicer to other implementations by doing
>   ... (unless (provide-mopp-symbol sym (or #+openmcl :openmcl
>                                            #+sbcl :sbcl
>                                            #+cmu :cmu
>                                            #+lispworks :lispworks
>                                            :unimplemented))
>         (warn ...))
> and either provide a method on :unimplemented or a method on
> NO-APPLICABLE-METHOD.

good idea.

> Unless there's a reason not to, you should be using the "SB-MOP"
> package here.  (If there is a reason, sbcl-devel wants to know about
> it!)

(Continue reading)


Gmane