[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message Passing with GOOPS

From: Pascal J. Bourguignon
Subject: Re: Message Passing with GOOPS
Date: Fri, 26 Jun 2015 13:13:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Marko Rauhamaa <address@hidden> writes:

> GOOPS also, surprisingly, seems to be decades behind in trying to
> present objects as collections of slots.
> I once heard this story. The French king had a royal ball in honor of
> the birthday of the French queen. When some lordly guests presented
> their gift, a pair of fancy stockings, the king drew a fit, declaring:
> "The Queen of France does not have legs!"
> Similarly, in my mind, objects don't have slots, they interact.

You are right.  Slots are an implementation detail.  Notice that you
have them in all (common) OO systems.  But the difference with CLOS,
with the MOP, (I don't know if GOOPS implements the MOP, Meta Object
Protocol), slots are reified as first class objects, and can be added or
removed from a class (therefore, to all its instances).

This allows you to forget slots as features of classes, but instead, as
an implementation mechanism for certain kinds of relationships.  So you
can define a macro define-associations and use it to describe how your
objects interrelate and interact with others, and this macro will add
slots as needed to implement those associations:

__Pascal Bourguignon__       
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]