[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: DEFSTRUCT-REDEFINITION (version 1)
- To: cl-cleanup@sail.stanford.edu
- Subject: Issue: DEFSTRUCT-REDEFINITION (version 1)
- From: masinter.pa@Xerox.COM
- Date: 12 Dec 88 09:44 PST
Perhaps we can bring a new version of this issue with us for distribution
at the January meeting.
I think the problem is that defstruct accessors are often compiled with
"knowledge" of the structure, in a way that defclass accessors are not. I
think of "defstruct" as "the most efficient defclass", i.e., I'd like to
leave maximum room for optimization. However, error-if-redefined seems a
bit too strong, e.g., if all I do is change the initial value, it doesn't
old compiled accessors or even old instances.
----- Begin Forwarded Messages -----
Date: Wed, 7 Dec 88 19:56 PST
From: Gregor.pa
Subject: Re: [masinter.pa: [cl-cleanup@sail.stanford.edu: DRAFT Issue:
DEFSTRUCT-REDEFINITION (Version 1)]]
To: masinter.pa
Fcc: BD:>Gregor>mail>outgoing-mail-4.text.newest
In-Reply-To: The message of 7 Dec 88 15:40 PST from masinter.pa
Message-ID: <19881208035629.7.GREGOR@PORTNOY.parc.xerox.com>
Line-fold: no
Sorry, but I just don't have the time to write this up just now. I am
barely managing to do what I have to do. Chapter 3 can support either
of the proposals. As I have written it now, I believe it specifies
error-if-redefined.
The only point about the relation to chapter 3 is that chapter 3 gives a
technical language for defining it. There are really three options:
error-if-redefined
error-iff-instances-exist
error-iff-used
In CLOS terminology these are:
(defmethod reinitialize-instance ((c structure-class) &rest ignore)
(error "..."))
or
(defmethod reinitialize-instance ((c structure-class) &rest ignore)
(when (class-finalized-p c)
(error "...")))
or
"The results are undefined if an instance with metaclass structure-class
is accessed after the generic function make-instances-obsolete has been
called with that class as an argument."
-------
----- End Forwarded Messages -----