From: ....What Is?....
Subject: CLOS Private Methods
Date: 
Message-ID: <20905@sdcc6.ucsd.edu>
How do I make a CLOS method private, so it can only be called by
other methods in the same class?

Steve Boswell         | This opinion is distributed in the hopes that it
······@ucsd.edu       | will be useful, but WITHOUT ANY WARRANTY...
······@gnu.ai.mit.edu |
-- 
Steve Boswell         | This opinion is distributed in the hopes that it
······@ucsd.edu       | will be useful, but WITHOUT ANY WARRANTY...
······@gnu.ai.mit.edu |
From: Barry Margolin
Subject: Re: CLOS Private Methods
Date: 
Message-ID: <1991Jun24.040141.27435@Think.COM>
[I've redirected followups to comp.lang.clos.]

In article <·····@sdcc6.ucsd.edu> ········@sdcc13.ucsd.edu (....What Is?....) writes:
>How do I make a CLOS method private, so it can only be called by
>other methods in the same class?

In CLOS, methods are not "in" a class, so there's no notion of methods
being "in the same class".  Generic functions invoke methods when the
argument types match the parameter specializers (note the plural).

In general, CLOS doesn't try to implement any information hiding.
SLOT-VALUE, WITH-SLOTS, and WITH-ACCESSORS can be used anywhere (even in
ordinary functions rather than methods).  As with the rest of Common Lisp,
the onus is on the programmer to establish and follow programming
conventions, rather than having them be enforced by the language.
-- 
Barry Margolin, Thinking Machines Corp.

······@think.com
{uunet,harvard}!think!barmar