Newsgroups: comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!yeshua.marcam.com!uunet!franz.com!franz!smh
From: smh@Franz.COM (Steve Haflich)
Subject: Re: slot option :TYPE
In-Reply-To: dryan@gadget.jsc.nasa.gov's message of 24 Oct 1994 15:16:45 GMT
Message-ID: <SMH.94Oct26161400@vapor.Franz.COM>
Sender: news@franz.com
Nntp-Posting-Host: vapor
Organization: Franz Inc., Berkeley, CA
References: <38gj4t$e6i@pendragon.jsc.nasa.gov>
Date: Wed, 26 Oct 1994 23:14:00 GMT
Lines: 31

In article <38gj4t$e6i@pendragon.jsc.nasa.gov> dryan@gadget.jsc.nasa.gov (Daniel Ryan) writes:

   From: dryan@gadget.jsc.nasa.gov (Daniel Ryan)

   When defining classes the type supplied for the :TYPE 
   slot option is now checked to make sure the specified 
   type does indeed exist, 
   (There was no checking in older versions).

The Art of the Metaobject Protocol requires this error checking; the
specified type be a type specifier name, otherwise an error must be
signalled.  See "Initialization of Slot Definition Metaobjects", AMOP
p. 204.

Actually, the AMOP requires this checking for creation of both
direct-slot-definition objects (i.e. at defclass time) as well as for
effective-slot-definition objects (at class-finalization time), but
ACL only checks the latter.  Otherwise it is too tedious to specify
classes with mutually-dependent slot types.  (I believe this has been
discussed on this list before, or maybe on comp.lang.lisp.)

   Does anyone know how to disable this checking?

I don't think you can turn it off, at least not easily, and perhaps
not portably.  You could define your own metaclass and write a
conpute-effective-slot-definition method for it, but the AMOP requires
that such a method be "extending", i.e., that it calls the standard
method, which is where the error is signalled.  And anyway, rewriting
all this machinery would be a lot of work.

So why do you need to declare slots to have nonexistent types?
