This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Trouble understanding define (!)
- To: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>, Michael Livshin <mlivshin at bigfoot dot com>
- Subject: Re: Trouble understanding define (!)
- From: Ken Anderson <kanderso at bbn dot com>
- Date: Thu, 03 Feb 2000 16:43:43 -0500
- Cc: Neil Jerram <neil at ossau dot uklinux dot net>, guile at sourceware dot cygnus dot com, amp-developers at bbn dot com
- References: <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>
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.