This is the mail archive of the guile@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: CLOS-style MOP for Guile ?


Christian Lynbech <chl@tbit.dk> writes:

> If I understand Michaels concern, the problem is this:
>
> [ lots of good stuff snipped ]
> 
> An alternative to the restrictive approach of preventing B from doing
> global updates, would be to allow it and instead use specifications on
> the module A detailing what should and should be done to the generic
> functions provided by A.
> 
> The idea is of course not my own. Kiczales and Lamping has written a
> rather nice paper on how to specify OO libraries. It is called:
> 
>       Issues in the Design and Specification of Class Libraries
> 
> and can be found under the name of documenting-oo-programs.ps.Z
> somewhere at their ftp site, whose address I do not remember but which
> I guess is the Xerox PARC one.

It's
ftp://ftp.parc.xerox.com/pub/openimpls/documenting-oo-programs.ps.Z

Ok, I read Bernard's response, got the message and got some sleep :).

Thanks Bernard, my concerns are irrelevant to module system once it is
understood that a generic is just an object, and once you have it, no
module system has a chance to stand between you.

Then I started doing my homework and checked out the aforementioned
paper.

It looks very convincing, and here is the passage that managed to
soothe my generic function paranoia:

"User-defined methods on specified generic functions must be specialized
 to a user-defined class".

Not only does it sound good, it also seems to be programmatically
enforcible, with some help from the module system.

The simplest way is too confine generic specialization to classes
defined in the same module in which the specialization occurs, but
that may be overly restrictive.  Well, maybe we should also permit
specialization if some special flag (#:trustme, for instance) is
given.

thanks Bernard and Christian.

bye,
mike.