swarm-support
[Top][All Lists]
Advanced

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

static or dynamic, that is the question.


From: Matthew M Murphy
Subject: static or dynamic, that is the question.
Date: Tue, 26 Oct 1999 19:45:07 -0400 (EDT)

Group:


I realized that I don't fully understand some aspects of the dynamic
features that Objective C allows, as well as how Swarm allows
modelers to incorporates static and dynamic typing.

Am I right in assuming that there are some objects (like space objects)
that might as well (and are (usually?)) be statically typed, since there
is (typically) only one of them and there isn't any reason to utilize
dynamic binding/typing in messages sent to the object?

Also, I understand the following syntax to declare a statically typed
object:

myBug * mbug;

The above syntax would typically appear in the implementation of a
top-level swarm.  Later, however, when each bug's instance variables are
initialized, the following might occur:

myBug = [Bug createBegin: [self getZone]];
... 
myBug = [myBug createEnd];

Am I right in assuming that each bug is going to be statically typed?

I am interested in creating a model in which agents are members of
different subclasses of the same abstract class.  What should I consider 
with regard to  static/vs dynamic typing when the agents interact?  

I want to be able to sent the same kind of message to all agents, but I
want agents to do different things depending on which subclass they belong
to. 

In general, I'd be interested in any relevant references and/or code
samples, as well as any information about design issues that one might
consider in order to best take advantage of Objective C's runtime system.

-=- Matt

        |------this is just a harmless separator, not a sigfile-------|




                  ==================================
   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]