From: Henrik Motakef
Subject: Introspection
Date: 
Message-ID: <87y98bv9af.fsf@pokey.henrik-motakef.de>
Hi,

With CLASS-OF, I can get the class of a arbitrary object. But, what
can I actually do with it? Is there a standard way to get more
information about a class?

For example, it would be interesting to know the defined slots of an
objects class when it's a STANDARD-CLASS, or the number of expected
arguments (and maybe even their declared types, if any) when it's some
kind of function.

Noticing that the only things I can find in the Hyperspec that seem
relevant are DESCRIBE and INSPECT, both with completely
implementation-defined behaviour, and that some limited capabilities
are in CLOCCs Port-library, I guess there isn't a good way. Is this
correct, or am I missing something?

Thanks
Henrik

From: Kenny Tilton
Subject: Re: Introspection
Date: 
Message-ID: <3DC464E3.9080906@nyc.rr.com>
Henrik Motakef wrote:
> Hi,
> 
> With CLASS-OF, I can get the class of a arbitrary object. But, what
> can I actually do with it? Is there a standard way to get more
> information about a class?

That would be a MOP function, and the MOP is not part of the standard, 
so it would be implementation dependent as you seem to have noticed.

That said, even under MCL which does not expose much of its MOP for the 
user to override, there were functions offering class introspection.

Try apropos on "slots". also "class-". etc etc.


-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Nils Goesche
Subject: Re: Introspection
Date: 
Message-ID: <878z0by0pb.fsf@darkstar.cartan>
Henrik Motakef <··············@web.de> writes:

> With CLASS-OF, I can get the class of a arbitrary object. But,
> what can I actually do with it? Is there a standard way to get
> more information about a class?
> 
> For example, it would be interesting to know the defined slots
> of an objects class when it's a STANDARD-CLASS, or the number
> of expected arguments (and maybe even their declared types, if
> any) when it's some kind of function.

The ANSI standard doesn't define much you can do with class
objects.  That's part of the metaobject protocol, described in

http://makeashorterlink.com/?E12E32252

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0