swarm-support
[Top][All Lists]
Advanced

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

Re: Objective-C/Java Translation


From: Marcus G. Daniels
Subject: Re: Objective-C/Java Translation
Date: 24 Jan 2001 15:41:44 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "RL" == Rob Leclerc <Rob> writes:

RL> As well as these "C" references, which I take to be some kind of
RL> create versions of the class, there are also some "S" type
RL> classes.  I was unable to get a good understanding of what the
RL> different or important roles these classes played. 

`C', or `creating' interfaces and implementation classes contain the
only the methods that are valid before createEnd runs.  These are the
methods like +createBegin: and -createEnd and all the -set*: methods
that describe structural characteristics of an object.

`S', or `setting' interfaces contain the methods that can be run both
before and after -createEnd runs.  These methods will typically be
things like -setVariable: where the variable doesn't concern something
structural in nature.

For example, a `C' method might set a DNA sequence that determined
whether or not the agent walked upright or not (and the -createEnd method
would process it), while a `S' method might set a transitory attribute
like heartrate.

Interfaces without the `C' or `S' names are `using' interfaces, i.e.
the methods available to a normally created and functioning agents.
For example, it is pretty difficult for an adult to change height,
sex, or amount of fast-twitch muscle without major artificial
intervention.

`Impl' is the suffix used for implementation clases.  This naming
convention is necessary to discriminate interfaces from actual
implementation classes.  You generally want to deal with objects as
interfaces, not as instances of implementation classes.

An interface is a known set of methods that you can get in a number of ways
from a number of sources.  But any object that implements an interface can
be dealt with as if it were just that interface.  

For example, it may be difficult to implement a method that takes a
large complex class as an argument, because many of the things that
class might do might be hard to accomodate, say exceptions.  Or, you
might not want to expose the power of the class to certain users.

Finally, there is no `SImpl' because the `S' interface are simply methods
that both `CImpl' and `Impl' provide.

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