[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS analogue to TYPEP and SUBTYPEP
- To: Eric Benson <eb@lucid.com>
- Subject: Re: CLOS analogue to TYPEP and SUBTYPEP
- From: Gregor.pa@Xerox.COM
- Date: Sun, 16 Oct 88 15:44 PDT
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- Fcc: BD:>Gregor>mail>outgoing-mail-4.text.newest
- In-reply-to: <8810162012.AA00239@blacksox>
- Line-fold: no
Date: Sun, 16 Oct 88 13:12:45 pdt
From: Eric Benson <eb@lucid.com>
I am looking for a function analogous to TYPEP or SUBTYPEP in CLOS.
Given two class objects, I need to know whether one is a superclass of
the other. I can't seem to find such a function in Chapter 2. Have I
missed something, is this relegated to Chapter 3, or is there
something inherently bogus about what I'm trying to do? It seems like
a rather ordinary thing, not terribly metaclassy. This came up while
writing a program using CLOS that is intended to be a simple example.
According to CLOS, you should be able to pass class objects or class
names to subtypep and typep. PCL hasn't yet arranged for this to work
for obvious reasons.
I believe there is a function in PCL called sub-class-p or subclassp
which does what you want. I would check, but that isn't so easy just
now.
-------