I don't know what I was drinking when trying to work out class documentation
strings last night... apologies for missing plenty that was quite obviously
in the HyperSpec:
1. documentation is a "standard generic function"
2. There's no "doc-type" in the "documentation" entry in the HyperSpec
for "structure-class" or "standard-class" - no idea how I misread
those...
So after some more hunting around (and perhaps a clearer head :>), I
can answer my own question (how to get doc string for a class or instance):
Use (documentation 'my-class 'type) to get doc about a named class, or
(documentation (type-of myinst) 'type) to get doc for an instance
[(documentation (class-of myinst) 'type) also seems to work]
It appears as though documentation strings are not inherited (makes sense
I guess or you'd expect documentation for an object all the way up to T).
I was going to ask how to work out superclasses / subclasses of
an object, but I think I'll hang fire and do more reading around before
making it look like I haven't read any of the netiquette sites twice in
one day!
-Duncan
ยทยท@robotcat.demon.co.uk (Duncan Rose) writes:
> I was going to ask how to work out superclasses / subclasses of
> an object,
AMOP has CLASS-DIRECT-SUBCLASSES, but that is not standard CL.
CMUCL exports these from the CLOS-MOP (aka MOP) package.