A MOP minimisation question
"Tim Bradshaw (as tfb at cley dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
As I mentioned in other messages a while ago, I wrote a trivial/special-purpose thing which does a limited version of SoA. I'm now slowly writing a more general one which is inevitably suffering from serious second-system syndrome. 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. Now bear in mind that once, long ago, I was fairly knowledgeable about the AMOP MOP, but for at least a decade I've barely used CLOS at all (I think I've had the classic 'object systems aren't all that' moment). What I do now is to have a metaclass which has some extra slots and so on. But an earlier version didn't do that: it just stored the class-level data in properties on the class name. 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). Performance is not a good reason: these things are never used when that matters since their entire purpose is to enable the system to compile things away. I realise this is an ideological question: assume I would rather minimise my code's exposure to the MOP even if using it is The Right Thing. --tim _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html