Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!news.media.mit.edu!news.media.mit.edu!alanr From: alanr@chopin.media-lab.media.mit.edu (Alan Ruttenberg) Newsgroups: comp.lang.clos Subject: Adding new mixins to a predefined class Message-ID: Date: 17 Jun 91 18:16:14 GMT Sender: news@news.media.mit.edu (USENET News System) Organization: MIT Media Laboratory Lines: 20 Is is possible to incrementally modify the definition of a class? What I have in mind is something like (defclass extra-mixin () ((extra-instance-variable))) (add-class-mixin predefined-class extra-mixin) - actually it would make more sense to do something like a setf of class-precedence-list, since you don't know where to add the mixin above. The example comes up in the following way. There is a class of windows which is supplied by the implementation. I want to add some functionality which requires an extra instance variable. I can't modify the source code, because I don't have it. So it would be nice to modify the class by adding a new instance variable, or some new default-initargs, or whatever. -alan