[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Classes with forward-referenced supers.
- To: Trent Lange <firstname.lastname@example.org>
- Subject: Re: Classes with forward-referenced supers.
- From: kanderso@DINO.BBN.COM
- Date: Wed, 31 Jan 90 10:47:12 -0500
- Cc: commonloops.pa@Xerox.COM
- In-reply-to: Your message of Tue, 30 Jan 90 22:57:52 -0800. <email@example.com>
- Redistributed: commonloops.pa
Date: Tue, 30 Jan 90 22:57:52 PST
From: Trent Lange <firstname.lastname@example.org>
Subject: Classes with forward-referenced supers.
What is the official word on making instances when a class has
e.g. (defclass a (b) (...) (...))
This worked in the "Can't think of a cute name PCL" (12/7/88), but
caused crashes in Victoria Day PCL. Mike Thome sent out a patch to
allocate-instance back in August 89 that instead signalled an error
when it noticed it instead of crashing. I grabbed the 1/1/90 alpha PCL,
to see what it did, and it also signalled an error rather than making
I don't see anything in CLOS Document 88-002R (the latest I could find
on arisia.xerox.com's pcl/doc) that mentions this.
It seems to me that making instances of classes with forward-referenced
supers definitely *should* be legal, simply creating an instance that
is minus the features of those forward-referenced classes. When the
forward-referenced supers are actually defined, of course, PCL
would then have to update any previously created instances, but this is
no different than when the class itself is redefined.
On the other hand, it seems *quite* important to be able to make instances
when all of the super-classes are not yet defined. Applying
class-prototypes comes directly to mind, plus defining classes with lists
of possible super-class mixins, which either may or may not be used
depending upon whether a user wants to load them or not.
So, is making an instance of a class with forward-referenced supers going
to be an official error, or will it be considered legal, in which case it
will be fixed in the next version of PCL?
I think your proposal is interesting. However, if you could create an
instance of a forward referenced class, you would loose the protection
that the current PCL provides. There would be no way to stop the use
from making instances when some important behavior was still missing.
If he never intends to use a set of mixins, redefining the class is
about as easy as not loading the file containing the mixins.