Re: A MOP minimisation question
"Didier Verna (as didier at didierverna dot net)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
"Tim Bradshaw (as tfb at cley dot com)" <[email protected]> wrote: > One of the things it needs to do is maintain information at the class > level: things like the layout of the arrays and how slots map onto > them, and so on. > What I do now is to have a metaclass which has some extra slots and so on. > If we assume that classes always have names (which is a restriction I > am more than happy with) is there really *any* good reason not to do > this and thus rely less on MOP features (I still need some small > ones). On good reason to use [meta-]classes is that it gives you the ability to specialize existing protocols on them. If you don't need existing behavior to be extended in any way, perhaps meta-classes are overkill. An intermediate solution between that and properties on the name (too global for my taste) is to use class-wide slots (:allocation :class). You can see that as a way to restrict the visibility of those properties to the appropriate domain. -- Resistance is futile. You will be jazzimilated. Lisp, Jazz, Aïkido: http://www.didierverna.info _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html