Hello,
I am playing with the mop and I find it really difficult to understand. The
art of the mop is shipping but in the meantime I am looking for more
accessible documentation that the spec on the web.
The thing I want to do immediately is record when a slot is accessed for
writing, except when the object is created. I think others have done that,
so I am looking for some pointers to examples.
I found that one:
http://abstractstuff.livejournal.com/33166.html
Pascal is commenting that it wont be portable. And I really don't understand
the distinction between metaclasses and standard-classes.
Thanks for any links.
--
Robert Ewald
The weblocks web framework does just that - pushes the object onto a
list whenever a particular slot is accessed. The MOP code is pretty
succinct (54 lines) and is located in the weblocks source tree at cl-
weblocks/src/widgets/widget/widget-mop.lisp
http://common-lisp.net/project/cl-weblocks/
Hope that helps.
On Apr 24, 6:06 pm, Robert Ewald <···················@gmx.net> wrote:
> Hello,
>
> I am playing with the mop and I find it really difficult to understand. The
> art of the mop is shipping but in the meantime I am looking for more
> accessible documentation that the spec on the web.
>
> The thing I want to do immediately is record when a slot is accessed for
> writing, except when the object is created. I think others have done that,
> so I am looking for some pointers to examples.
>
> I found that one:http://abstractstuff.livejournal.com/33166.html
>
> Pascal is commenting that it wont be portable. And I really don't understand
> the distinction between metaclasses and standard-classes.
>
> Thanks for any links.
> --
> Robert Ewald
Robert Ewald wrote:
> Hello,
>
> I am playing with the mop and I find it really difficult to understand. The
> art of the mop is shipping but in the meantime I am looking for more
> accessible documentation that the spec on the web.
>
> The thing I want to do immediately is record when a slot is accessed for
> writing, except when the object is created. I think others have done that,
> so I am looking for some pointers to examples.
Try Andreas Paepcke's paper "User-Level Language Crafting" (Google is
your friend). It's a pretty nice introduction to the CLOS MOP, although
it differs in a few minor details from the actual CLOS MOP.
Nevertheless, it's a good intro to the topic.
> I found that one:
> http://abstractstuff.livejournal.com/33166.html
>
> Pascal is commenting that it wont be portable. And I really don't understand
> the distinction between metaclasses and standard-classes.
Read the paper above and read AMOP. It should be clearer then.
The code is indeed not portable as is, but is easy to fix, once you know
how the CLOS MOP works.
Pascal
--
1st European Lisp Symposium (ELS'08)
http://prog.vub.ac.be/~pcostanza/els08/
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/