This is the mail archive of the
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><email@example.com><200001182250.WAA00624@ossau><firstname.lastname@example.org><200001221200.MAA00478@ossau><email@example.com><firstname.lastname@example.org><email@example.com><firstname.lastname@example.org><email@example.com><firstname.lastname@example.org>
While i'm not completely up on your discussion, i can provide some CLOS perspective.
Kiczales' paper is definitely worth reading.
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.