Jim Newton
3/3/2016 9:29:00 AM
On Wednesday, March 2, 2016 at 9:22:26 PM UTC+1, Kaz Kylheku wrote:
.. separate the mixins from the mixtures. If you want a new mixture
> that is like another one but with this other thing mixed, then make it
> from scratch using the same ingredients and not by inheriting the
> mixture.
>
No doubt CLOS is very strong and flexible, but of course has limitations, as any system does.
Another thing I've occasionally like to do is make a method applicable if the class inherits from
two particular classes. I.e., if the instance if of class-A and also of class-B, then do this. I
seem to recall this was needed for debugging reasons... If I've inherited the debug-class and
also the feature-X class, then do this extra debugging-specific thing to debug-feature-X.
Of course there are ways to workaround this. E.g., the method could specialize on debug-class and contain logic to specifically check for feature-x-class. That's not so bad in the end, since the
ugliness is in the debug-class.