Good LISP steals?

Bruce Cohen brucecohen at qwest.net
Wed Apr 17 18:58:54 UTC 2002


At 1:14 AM -0700 4/17/02, Brian T. Rice wrote:
>
>Not at all. My final note is about the tools we use, which relates 
>to the *DUM DA DUM* CLOS MOP that everyone gets so excited about 
>when they discover it (I definitely did, but this was in '94). My 
>biggest idea has been that the menus don't really reflect any kind 
>of conceptual structure, which only when I just read your post did 
>it (recently) occur to me that it specifically relates to the lack 
>of a MOP. What I mean is that we could include things like objects 
>for reifying slots themselves, or separate the object structural 
>information from itself (Kent Beck in the back of the _Ordered 
>Collections_ book recommends a MetaObject refactoring of just this 
>kind). (Right now, you can use such methods on any object to "hack" 
>in it, breaking abstraction.) This isn't as necessary though as 
>making menus that support the concepts, so that I can manage slots 
>by clicking on a list(Morph) of slots in the current class and get 
>more than "methods calling this instVar". This is just a small 
>example that comes to mind, though. I also just recalled that 
>MetaObjects can be used to encapsulate both the dependents mechanism 
>and the mutation protection I mentioned above.
>

The biggest win of a MOP, IMHO, is that it allows you to do what 
amounts to aspect-oriented programming without having to build a lot 
of aspect-oriented tools and frameworks.  For instance, having a 
reified Metaclass lets you add or modify the system behavior of 
methods without creating new subclasses and modifying the 
application-level code of the methods in the subclass. You can 
replace the "DoesNotUnderstand" proxy hack, and not have to either 
write a lot of delegation methods or build a tool to generate them.

One of the nicest examples of this I've seen was in a paper at OOPSLA 
'89, in which the author showed how to make objects persistent using 
MOP:

Andreas Paepcke. PCLOS: Stress Testing CLOS - Experiencing the 
Metaobject Protocol. In Proceedings of the Conference on 
Object-Oriented Programming Systems, 1990. 
http://www-db.stanford.edu/~paepcke/shared-documents/pclosmeta.ps


-- 
"The joke is over when the head falls off." - Scotts' proverb
=========
Bruce Cohen
5908 SW California St.
Portland, OR 97219
brucecohen at qwest.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020417/5ad5938a/attachment.htm


More information about the Squeak-dev mailing list