🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by cs631114 Tue, 13 Oct 1992 18:13
Retrieving documentation of slots?
#328
Author: cs631114
Date: Tue, 13 Oct 1992 18:13
4 lines
588 bytes
Hmm, I finally got around to trying to use doc strings on slots, and much
to my embarrassment realized I didn't know how to retrieve them! Assumedly
I am overloooking the obvious. Hints, anyone?
Re: Retrieving documentation of slots?
#330
Author: Barry Margolin
Date: Tue, 13 Oct 1992 19:20
23 lines
1556 bytes
In article <1992Oct13.181308.24194@umbc3.umbc.edu> cs631114@umbc8.umbc.edu (cs631114) writes:
>Hmm, I finally got around to trying to use doc strings on slots, and much
>to my embarrassment realized I didn't know how to retrieve them! Assumedly
>I am overloooking the obvious. Hints, anyone?

No, you're not overlooking anything.  As it says in the Notes section of
the dpANS description of DOCUMENTATION:

    This standard prescribes no means to retrieve the \term{documentation
    strings} for individual slots specified in a \macref{defclass} form,
    but \term{implementations} might still provide debugging tools and/or
    programming language extensions which manipulate this information.
    Implementors wishing to provide such support are encouraged to consult
    the \term{Metaobject Protocol} for suggestions about how this might be
    done.

In most implementations you should be able to get the documentation strings
with the MOP, presumably using an accessor on the slot-description object.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Re: Retrieving documentation of slots?
#334
Author: Trent Lange
Date: Wed, 14 Oct 1992 14:06
28 lines
1861 bytes
In article <1bf7hrINNg9g@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
>
>No, you're not overlooking anything.  As it says in the Notes section of
>the dpANS description of DOCUMENTATION:
>
>    This standard prescribes no means to retrieve the \term{documentation
>    strings} for individual slots specified in a \macref{defclass} form,
>    but \term{implementations} might still provide debugging tools and/or
>    programming language extensions which manipulate this information.
>    Implementors wishing to provide such support are encouraged to consult
>    the \term{Metaobject Protocol} for suggestions about how this might be
>    done.

Has this been changed?  On p. 840 of Steele 2nd edition, it defines
that a DOCUMENTATION method should be specialized on
"STANDARD-SLOT-DESCRIPTION", which I presume was meant to be the
equivalent of the current STANDARD-SLOT-DEFINITION.

In any case, in July 92 PCL you can get the documentation of an
effective or direct slot definition object through (PCL::DOCUMENTATION
<slot-def>).

Getting the slot definition object itself is of course a simple matter
of searching along the CLASS-SLOTS of a class for the slot definition
with appropriate SLOT-DEFINITION-NAME.  (In PCL one can use
(PCL::FIND-SLOT-DEFINITION <class> 'slot-name)).

- Trent Lange
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads