[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS analogue to TYPEP and SUBTYPEP
Date: Sun, 16 Oct 88 13:12:45 pdt
From: Eric Benson <email@example.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