[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Patrick Dussud <email@example.com>
- Subject: Re: ENSURE-CLASS-USING-CLASS
- From: David N Gray <Gray@dsg.csc.ti.com>
- Date: Wed, 13 Sep 89 12:25:09 CDT
- Cc: Common-Lisp-Object-System@SAIL.Stanford.edu
- In-reply-to: Msg of Wed, 13 Sep 89 08:21:17 PDT from Patrick Dussud <firstname.lastname@example.org>
- Sender: GRAY@kelvin.csc.ti.com
> Therefore, I believe that the present model is not general enough and a
> :NAME argument needs to be added to the class initialization arguments.
> I don't think you are prevented from adding your own initargs to make-instance
> for metaobjects. Adding :name to the make-instance call that comes from the
> expansion of a defflavor is a fine extension. The other issue is to require
> that the call to make-instance resulting from the expansion of defclass
> contains the :name argument. Do you really want that? It does not seem
> absolutely necessary.
Yes, I want it. (It turns out that the :ENVIRONMENT argument also needs
to be passed along with the name.) If it is intended that the
:METACLASS option of DEFCLASS will only be used with subclasses of
STANDARD-CLASS, then it would not be necessary, but that seems like an
unnecessary restriction on the extensibility of DEFCLASS. The same
problems can arise if you want to do (:METACLASS STRUCTURE-CLASS). This
isn't just a theoretical problem; we already have people using DEFCLASS
to define windows and conditions, which in the current Explorer
implementation are actually implemented as flavors. That worked quite
nicely when we were using ADD-NAMED-CLASS, but when I converted to using
the ENSURE-CLASS model, I found that I needed to either add the name and
environment to the initialization arguments or else use the clumsy
approach of passing them under the table in special variables.
To turn the question around, is there some advantage to hiding the
name from the initialization code?