>>>>> "ctu" == ctu  <[EMAIL PROTECTED]> writes:

  ctu> There's a problem when i define a class with name "method" in a
  ctu> new package.
  ctu> 
  ctu> * (defpackage toto)
  ctu> #<The TOTO package, 0/9 internal, 0/2 external>

the TOTO package uses the CL package, and METHOD is a standard system
class, so is already defined by CMUCL.

,----
| CL-USER> (package-use-list (find-package :toto))
| (#<The COMMON-LISP package, 0/69 internal, 978/1227 external>)
| CL-USER> (find-class 'cl:method)
| #<standard-class method {2819785D}>  
`----

  ctu> * (defclass method () ()) ; it's no more ok ?
  ctu> ; [GC threshold exceeded with 12,012,056 bytes in use.  Commencing GC.]

here you're redefining an external symbol in the CL package, which is not
allowed by the specification; see section 11.1.2.1.2 "Constraints on
the COMMON-LISP Package for Conforming Programs" of CLtS.

CMUCL has a facility for locking packages, which is intended to
protect you against this kind of accidental redefinition. Package
locks don't currently protect against redefinition using DEFCLASS and
DEFMETHOD; perhaps they should. 

-- 
Eric Marsden                          <URL:http://www.laas.fr/~emarsden/>

Reply via email to