This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trouble understanding define (!)


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-OOPSLA92/

No language i know of lets you specify the issues raised in the paper.

I believe CLOS did not provide any protection model because we didn't know what a good model was, and Lisp was pretty much completely open anyway, and the MOP guarrentteed that it was open.  The issue seemed orthogonal to the MOP.  Encapsulation was enforced by the dicipline of using accessors and methods rather than slot-value.

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?

Part of being a generic function is that methods can be added to you.  The easiest way to do this is to have a name, as CLOS more or less requires.  Names conflict as you point out, and modules systems help up to a point.  In Tiny CLOS you can have anonymous generics but somehow they still need to find each other.

I think your proposal is good.  Use the module system to carefully merge names and resolve conflicts like (draw) by hand, or planning a head and picking a more distinctive name.  Perhaps there should be tools to help.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]