swarm-support
[Top][All Lists]
Advanced

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

Re: What classes are there in Swarm and where do "object creators" come


From: Marcus G. Daniels
Subject: Re: What classes are there in Swarm and where do "object creators" come from?
Date: 17 Feb 2000 09:55:51 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul Johnson <address@hidden> writes:

PJ> The issue is about protocols, and what's a class
PJ> in swarm, and how do users know what "classes" in swarm can create
PJ> objects? 

Interfaces that support creation are listed in the protocol files as
adopting the "CREATABLE" protocol.

PJ> And, furthermore, how much compile time error checking
PJ> do you buy by naming something statically or declaring a protocol.

By "declaring a protocol" you mean "id <MovieActor> sylvester"?
They're the same, assuming you make sure the implementation classes
claim to implement the protocols and use variables that conform toe
protocols as above.  If you just say "id sylvester", then you have
no method-level checking, except to the extent the compiler can see
if the methods you send to sylvester are included in the module at all.

PJ> First, does every Protocol have a corresponding "object creator"
PJ> of the same name? 

No, just those tagged as "CREATABLE".

PJ> But there is something in the middle, between the
PJ> protocol declarations and the differently-named classes, that is
PJ> gluing them together.  What is that?

The associations are made in _MODULE_implement in MODULE.m.

[...]
PJ> However, if I declare sylvester this way,

PJ>   id <MovieActor> sylvester; and create the instance the same way
PJ> as before, and then tell the agent to do something not in the
PJ> protocol, then the compiler issues a warning that the action is
PJ> not in the protocol.  With swarm's Makefile.common using -Werror,
PJ> this stops the compilation.  Is this right?

Yes.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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