Mariano Montone wrote:
> Hi!
>
> Do you have any thoughts [...] on CLOS metaclasses
> composition?
Just one: what is CLOS metaclass composition?
Alberto
On 5 jun, 14:14, Alberto Riva <····@nospam.ufl.edu> wrote:
> Mariano Montone wrote:
> > Hi!
>
> > Do you have any thoughts [...] on CLOS metaclasses
> > composition?
>
> Just one: what is CLOS metaclass composition?
>
> Alberto
I want the behavior of a class to be determined by several meta
classes, not just one.
There's some research made on that here:
http://www.esug.org/data/ESUG2004/ESUG2004-RT-MetaclassTraits.pdf and
here: http://vst.ensm-douai.fr/MetaclassTalk/uploads/1/mixinsForSafeMetaclassComposition.NouryBouraqadi.bled25aug2003.pdf
But it seems I will have to investigate meta class composition in CLOS
on my own.
Mariano
Mariano Montone wrote:
> On 5 jun, 14:14, Alberto Riva <····@nospam.ufl.edu> wrote:
>> Mariano Montone wrote:
>>> Hi!
>>> Do you have any thoughts [...] on CLOS metaclasses
>>> composition?
>> Just one: what is CLOS metaclass composition?
>>
>> Alberto
>
> I want the behavior of a class to be determined by several meta
> classes, not just one.
>
> There's some research made on that here:
> http://www.esug.org/data/ESUG2004/ESUG2004-RT-MetaclassTraits.pdf and
> here: http://vst.ensm-douai.fr/MetaclassTalk/uploads/1/mixinsForSafeMetaclassComposition.NouryBouraqadi.bled25aug2003.pdf
>
> But it seems I will have to investigate meta class composition in CLOS
> on my own.
Why? Until now no one had a clue what you were talking about. If you
want to get sarcastic, make a wisecrack about first your lack of
communication skills and then your prickliness.
Back OT: research? What are you, an academic? STFU and create a
metaclass that multiply inherits from other metaclasses: it works.
hth, kt
On 5 jun, 20:23, Kenneth Tilton <·········@gmail.com> wrote:
create a
> metaclass that multiply inherits from other metaclasses: it works.
>
> hth, kt
That's all I wanted to hear. No need to be aggressive.
Mariano
Mariano Montone wrote:
> On 5 jun, 20:23, Kenneth Tilton <·········@gmail.com> wrote:
> create a
>> metaclass that multiply inherits from other metaclasses: it works.
>>
>> hth, kt
>
> That's all I wanted to hear.
No, you wanted to hear something more generally useful: The MOP uses
CLOS as well as implements it, so there was no need for the specific
question about multiple inheritance.
> No need to be aggressive.
You're no fun.
kt
On 5 jun, 23:01, Kenneth Tilton <·········@gmail.com> wrote:
> Mariano Montone wrote:
> > On 5 jun, 20:23, Kenneth Tilton <·········@gmail.com> wrote:
> > create a
> >> metaclass that multiply inherits from other metaclasses: it works.
>
> >> hth, kt
>
> > That's all I wanted to hear.
>
> No, you wanted to hear something more generally useful: The MOP uses
> CLOS as well as implements it, so there was no need for the specific
> question about multiple inheritance.
My question was not about multiple inheritance. I wanted to see some
code that does meta classes composition!! Or some advice, whatever.
It's ok if you don't have any. But you get angry. I don't understand.
>
> > No need to be aggressive.
>
> You're no fun.
Take it easy, man!
Mariano
Mariano Montone wrote:
> On 5 jun, 23:01, Kenneth Tilton <·········@gmail.com> wrote:
>> Mariano Montone wrote:
>>> On 5 jun, 20:23, Kenneth Tilton <·········@gmail.com> wrote:
>>> create a
>>>> metaclass that multiply inherits from other metaclasses: it works.
>>>> hth, kt
>>> That's all I wanted to hear.
>> No, you wanted to hear something more generally useful: The MOP uses
>> CLOS as well as implements it, so there was no need for the specific
>> question about multiple inheritance.
>
> My question was not about multiple inheritance. I wanted to see some
> code that does meta classes composition!!
Oh, I thought you said:
> I want the behavior of a class to be determined by several meta
> classes, not just one.
So you wanted the determination not to be by inheritance? Perhaps by
gravitational pull? Well, then, put them really close together in your
source code, there's an inverse square relation to distance, you know.
> Or some advice, whatever.
> It's ok if you don't have any.
I don't have any? You already thanked me for providing the information
you requested. Any flickering hope we had left for you is about to wink out.
> But you get angry. I don't understand.
>>> No need to be aggressive.
>> You're no fun.
>
> Take it easy, man!
Sure, after I rip your heart out and eat it.
hth, kt
On Jun 6, 12:40 am, Kenneth Tilton <·········@gmail.com> wrote:
[...]
> Sure, after I rip your heart out and eat it.
Kenneth Tilton *is* Mola Ram.
Later,
Pillsy
On 6 jun, 01:40, Kenneth Tilton <·········@gmail.com> wrote:
> > I want the behavior of a class to be determined by several meta
> > classes, not just one.
>
> So you wanted the determination not to be by inheritance? Perhaps by
> gravitational pull? Well, then, put them really close together in your
> source code, there's an inverse square relation to distance, you know.
>
> > But you get angry. I don't understand.
> >>> No need to be aggressive.
> >> You're no fun.
>
> > Take it easy, man!
>
> Sure, after I rip your heart out and eat it.
>
> hth, kt
Haha, you are funny!! Hope you are not dangerous!!
Mariano
On 2009-06-06 09:45:42 -0400, Mariano Montone <··············@gmail.com> said:
> Haha, you are funny!! Hope you are not dangerous!!
only in front of a keyboard ;^)
--
Raffael Cavallaro
Mariano Montone wrote:
> On 6 jun, 01:40, Kenneth Tilton <·········@gmail.com> wrote:
>>> I want the behavior of a class to be determined by several meta
>>> classes, not just one.
>> So you wanted the determination not to be by inheritance? Perhaps by
>> gravitational pull? Well, then, put them really close together in your
>> source code, there's an inverse square relation to distance, you know.
>>
>>> But you get angry. I don't understand.
>>>>> No need to be aggressive.
>>>> You're no fun.
>>> Take it easy, man!
>> Sure, after I rip your heart out and eat it.
>>
>> hth, kt
>
> Haha, you are funny!! Hope you are not dangerous!!
I only actually attack bouncers which they seem to enjoy greatly, breaks
up a long night.
kt
Mariano Montone wrote:
> On 5 jun, 14:14, Alberto Riva <····@nospam.ufl.edu> wrote:
>> Mariano Montone wrote:
>>> Hi!
>>> Do you have any thoughts [...] on CLOS metaclasses
>>> composition?
>> Just one: what is CLOS metaclass composition?
>>
>> Alberto
>
> I want the behavior of a class to be determined by several meta
> classes, not just one.
>
> There's some research made on that here:
> http://www.esug.org/data/ESUG2004/ESUG2004-RT-MetaclassTraits.pdf and
> here: http://vst.ensm-douai.fr/MetaclassTalk/uploads/1/mixinsForSafeMetaclassComposition.NouryBouraqadi.bled25aug2003.pdf
Mixins can indeed solve some problems of metaclass composition (but I
don't think these are the most interesting ones).
In CLOS, using mixins is "just" a programming style, the restrictions of
a particular mixins (or traits) model are not enforced. In general,
Common Lisp trusts programmers to know what they are doing, and there
are always reasons to break rules, so... ;)
Pascal
--
ELS'09: http://www.european-lisp-symposium.org/
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
Mariano Montone wrote:
> Hi!
>
> Do you have any thoughts, code or pointers on CLOS metaclasses
> composition?
As Kenny, in his usual irritating style, already pointed out, in CLOS
you can do metaclass composition by way of multiple inheritance. In
practice, CLOS multiple inheritance is usually used for mixin-style
class composition, but it is slightly more general than that.
Nevertheless, it's a good approximation to think about it like that.
Since metaclasses are in general not composable, the CLOS MOP specifies
a generic function validate-superclass, which you have to override to
enable composition of certain metaclasses. Since this is somewhat
annoying, most CLOS MOP code actually unlocks metaclass composition /
metaclass inheritance in a quite liberal way, which is ok in most cases.
There are no papers or articles that I am aware of that discuss this
topic for the CLOS MOP. There is, however, a good book by Danforth and
Forman called "Putting Metaclasses to Work" which discusses some of the
metaclass compatibility issues for a C++-based MOP, many of which are
also applicable for CLOS MOP.
I use metaclass composition by way of multiple inheritance quite heavily
in ContextL, exactly for the purpose to keep the implementations of
different language constructs separate (which are implemented as
metaclasses). You can get the source code for studying this here:
http://common-lisp.net/project/closer/contextl.html
You should also be able to find other examples in the usual Common Lisp
repositories. For example, I am aware of cl-dwim using metaclass
composition at least to a certain extent. See
http://common-lisp.net/project/cl-dwim/
I hope this helps a bit.
Pascal
--
ELS'09: http://www.european-lisp-symposium.org/
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/