4.2. Classes
Prev | Chapter 4. Types and Classes | Next

## 4.2. Classes [sec_4-3]

The CLOS symbols are `EXPORT`ed from the package “CLOS”. “COMMON-LISP” uses (as in `USE-PACKAGE`) “CLOS” and `EXT:RE-EXPORT`s the [ANSI CL standard] standard exported symbols (the CLISP extensions, e.g., those described in Chapter 29, Meta-Object Protocol, are not `EXT:RE-EXPORT`ed). Since the default `:USE` argument to `MAKE-PACKAGE` is “COMMON-LISP”, the standard CLOS symbols are normally visible in all user-defined packages. If you do not want them (for example, if you want to use the PCL implementation of CLOS instead of the native one), do the following:

    (DEFPACKAGE "CL-NO-CLOS" (:use "CL"))
    (DO-EXTERNAL-SYMBOLS (symbol “COMMON-LISP”)
      (SHADOW symbol "CL-NO-CLOS"))
    (DO-SYMBOLS (symbol "CL-NO-CLOS")
      (EXPORT symbol "CL-NO-CLOS"))
    (IN-PACKAGE "CL-NO-CLOS")
    (LOAD "pcl")	; or whatever
    (DEFPACKAGE "MY-USER" (:use "CL-NO-CLOS"))
    (IN-PACKAGE "MY-USER")
    ;; your code which uses PCL goes here

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
4.1. Types | Home | 4.3. Deviations from ANSI CL standard