[Openmcl-devel] CLOS implementation weirdness?

Adam Jensen hanzer at riseup.net
Tue Jun 9 08:24:19 PDT 2015


On Tue, 09 Jun 2015 17:17:15 +0200
Dirk Eßer <essdir at web.de> wrote:

> The problem seems to be, that CCL defines a class LOCK already, which is 
> accessible in package CL-USER (the current package right after starting 
> the lisp). Due to this, you are not defining a new class, but trying to 
> redefine the existing class (which fails).
> 
> To start with a clean package (i.e., only symbols, which the CLHS 
> mandates), try
> 
> ? (defpackage "FOO" (:use "COMMON-LISP"))
> #<Package "FOO">
> ? (in-package "FOO")
> #<Package "FOO">
> ? (defclass lock ()
>    ((name :initarg :name :reader lock-name))
>    (:documentation "The foundation of all locks."))
> #<STANDARD-CLASS LOCK>
> 

Ooo, super cool. Thanks!



More information about the Openmcl-devel mailing list