From: Raymond Toy
Subject: Re: help with CLOS -- please!
Date: 
Message-ID: <4n4t28vn7r.fsf@rtp.ericsson.se>
Sam Steingold <···@usa.net> writes:

> 5. ...  Is there such thing as public/private slot
> paradigm? 

As others have already mentioned, you can use the package system to do 
some of this.

I just wanted to point out that Graham's "ANSI Common Lisp" book has
an example that makes the slots completely inaccessible.  I think it
basically gensyms the slot names so that only the class has access to
the slots.  Never tried it out though.


Ray

From: Sunil Mishra
Subject: Re: help with CLOS -- please!
Date: 
Message-ID: <efyoh0g1i38.fsf@northside.cc.gatech.edu>
In article <··············@rtp.ericsson.se> Raymond Toy <···@rtp.ericsson.se> writes:

   Sam Steingold <···@usa.net> writes:

   > 5. ...  Is there such thing as public/private slot
   > paradigm? 

   As others have already mentioned, you can use the package system to do 
   some of this.

   I just wanted to point out that Graham's "ANSI Common Lisp" book has
   an example that makes the slots completely inaccessible.  I think it
   basically gensyms the slot names so that only the class has access to
   the slots.  Never tried it out though.

class-slots (mentioned in AMOP) returns (at least in lispworks) the slots
of a class...

Sunil
From: Espen Vestre
Subject: Re: help with CLOS -- please!
Date: 
Message-ID: <w6wwf3lvgu.fsf@gromit.nextel.no>
·······@northside.cc.gatech.edu (Sunil Mishra) writes:

> class-slots (mentioned in AMOP) returns (at least in lispworks) the slots
> of a class...

yes, but notice that what is returned is the list of "effective slot
definition metaobjects", not the list of slot names.

If you need to get a list of the slot _names_, this should be according
to the MOP spec, I guess, and works under Allegro CL 4.3.1/unix:

(mapcar #'clos:slot-definition-name 
        (clos:class-slots (find-class 'myclass)))

--

regards,
  Espen Vestre
  Telenor Nextel
  Norway