Re: CLOS / MOP package name
From: Duane Rettig (duane_at_franz.com)
Date: 15 Feb 2005 08:41:29 -0800
Bruno Haible <email@example.com> writes:
> Rob Warnock wrote:
> >| (CLOS:METHOD-FUNCTION method)
> > Note that in CMUCL that needs to be PCL:METHOD-FUNCTION,
> Yes, and it's annoying that the implementations don't provide a unique
> package name for their MOP implementation.
> Allegro: "CLOS"
Note first that the implementation of the MOP is actually internally
implemented in Allegro's EXCL package, because it is just part of
CLOS and is integrated with the rest of the lisp in our general
implementation package. The package which _exports_ the MOP
interface has CLOS as a nicknme, but its actual name is ACLMOP,
to keep from confiscating any generic names (if done carefully,
users can use rename-package to grab nicknames they want to use
for other purposes). The nicknames for the ACLMOP package are
MOP, CLOS (of course), and ACL-MOP (for back-compatibility; some
don't like hyphens in package names for esthetic reasons).
> GNU clisp: "CLOS"
> LispWorks: "CLOS"
I have no problem with CLOS as a name for MOP functions, and we use
it in Allegro CL for backward compatibility for traditional usages
of MOP functions. However, it is ironic that those CLOS names which
are explicitly specified by ANS cannot be homed in a separate CLOS
package, since they are in the Common Lisp package. In our own
source code, we tend to use MOP as the package identifier, as in
> GNU gcl: "PCL"
> CMUCL: "PCL"
> SBCL: "SB-PCL"
PCL is not CLOS, and that is why through the years we took references
to PCL out of our code, as we tried to work toward more CLOS conformance
and MOP agreement.
> OpenMCL: "OPENMCL-MOP"
This would seem like a good package name if CLOS were added as a
> It's time for all implementations to support the name "CLOS" as a nickname,
> at least. Otherwise portable code needs to carry around stuff like this
> #-(or CLISP ALLEGRO LISPWORKS)
> (let ((packname
> #+SBCL "SB-PCL" ; or "SB-MOP"?
> #+CMU "PCL" ; or "MOP"?
> #+OpenMCL "OPENMCL-MOP" ; or "CCL" ?
> #+SBCL (unlock-package packname)
> (rename-package packname packname
> (cons "CLOS" (package-nicknames packname))))
I agree. But why CLOS, and not MOP? CLOS (the system) is already
standardized, and is part of Common Lisp, and the interface functions
mentioned in the standard are mandated to be in the Common Lisp package.
The name MOP more closely reflects the intention of those functions
which are not part of Common Lisp but which align themselves to the
-- Duane Rettig firstname.lastname@example.org Franz Inc. http://www.franz.com/ 555 12th St., Suite 1450 http://www.555citycenter.com/ Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182