This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Trouble understanding define (!)
- To: guile at sourceware dot cygnus dot com
- Subject: Re: Trouble understanding define (!)
- From: Thierry Bezecourt <thbz at worldnet dot fr>
- Date: Fri, 04 Feb 2000 11:51:19 +0100
- References: <xy73drec8ap.fsf@mdj.nada.kth.se><Michael Livshin's message of "30 Jan 2000 18:17:18 +0200"><200001142054.UAA00622@ossau><p2tzou4o5ov.fsf@pampelmuse.zrz.tu-berlin.de><200001182250.WAA00624@ossau><xy7ya9nezzz.fsf@mdj.nada.kth.se><200001221200.MAA00478@ossau><xy7bt6e82ru.fsf@mdj.nada.kth.se><s3zotxrqoz.fsf@verisity.com><xy7iu0cbc1z.fsf@mdj.nada.kth.se><s3iu0bq1x5.fsf@verisity.com><xy71z6z35os.fsf@mdj.nada.kth.se><s33drfpm9d.fsf@verisity.com>
At 16:43 03/02/2000 -0500, Ken Anderson wrote:
>While i'm not completely up on your discussion, i can provide some CLOS
perspective.
>
>Kiczales' paper is definitely worth reading.
>http://www.parc.xerox.com/csl/groups/sda/publications/papers/Kiczales-OOPSL
A92/
I read it a few days ago. It is the kind of reading which helps the
programmer what is really involved in his everyday work (in my case with C++).
>I know several CLOS programmers, including myself who were suprised to
find out that
>in Java or C++ instances of the same class can invoke private methods on
each other.
> Is there a good reason for this besides convenience?
I suppose the idea is that private methods are implementation-specific (to
use Kiczales' terminology), so that code written by the implementor of the
class, and only that code, is allowed to call a private method in the same
class. That person knows where the private method should or should not be
called on an instance or on another. Code written for a sub-class of that
class cannot call the private method because the sub-class may be written
by someone who doesn't know when the private method should be used.
I don't know what could be the equivalent of private methods in Goops or
CLOS, since methods do not belong to classes. On what basis would a method
be allowed to call another method or not ? The only way I see is to define
it in a module and not to export it, so that it can be called within the
module only. Maybe there are other ways, but I am familiar enough with
Goops, and I shouldn't even mention CLOS.
--
Thierry Bézecourt
bezecourt@globeid.com