[pro] Modularity for subclassing in Common Lisp

Matthew D. Swank akopa at charter.net
Wed Dec 8 04:10:35 UTC 2010


On 12/07/2010 09:19 PM, Faré wrote:
> A better question might be
> how do you enforce disjointness of some mixins. I suppose a
> heavy-handed use of MOP magic could do it, but oh well.
Q: Doctor, it hurts when I do this.
A: Well, don't do that.

In the examples I looked at that inspired me to use IPS (<map> might
have been one), sets of mixins partition (part of) a default
implementation, and most of methods specialize only on interface types. 
As a whole, the parts of the protocol implemented by a set of mixins
depend only the unimplemented generic functions, and not on any
particular datatype. Kinda a Ruby Module-y, Smalltalk Trait-y sort of
thing. 

Matt




More information about the pro mailing list