![](https://secure.gravatar.com/avatar/34273995705eeb69786278a23a87d921.jpg?s=120&d=mm&r=g)
8 Dec
2010
8 Dec
'10
4:10 a.m.
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