swarm-support
[Top][All Lists]
Advanced

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

Re: Are Messages First Class Entities In Java?


From: Theodore C. Belding
Subject: Re: Are Messages First Class Entities In Java?
Date: Mon, 21 Oct 1996 14:04:39 -0400

Hi-
CORBA/OpenDoc lets you do stuff like that.  You should read:
Orfali, R., D. Harkey, and J. Edwards. (1996). The Essential Distributed
Objects Survival Guide. Wiley. ISBN 0-471-12993-3

Of course, that may add more overhead than you want.  And I don't know if
Java support for CORBA (Java Beans, etc.) is fully available yet.

Frankly, I think you overstate things when you say:
>  // Note: This sort of thing is crucial for a general-purpose
>  // simulation framework (i.e. a simulation environment that
>  // doesn't need recompilation whenever a user adds new classes
>  // of simulated objects)...

I think it would be very interesting to see what a Swarm-like system in C++
or Java would look like.  Especially one that made explicit use of design
patterns:
Gamma, E., R. Helm, R. Johnson, and J. Vlissides. (1995). Design Patterns:
Elements of reusable object-oriented software. Addison-Wesley. ISBN
0-201-63361-2

I'm not talking about a simple one-to-one port of Swarm -- each language
has its own idioms and ways of doing things. And I'm not saying that the
Swarm team should do it.  But it would be interesting.  Swarm uses this
kind of fully dynamic messaging extensively, but it's not at all clear to
me that a simulation framework *needs* to use it.  Swarm is a great,
groundbreaking piece of work, but it would be sad if people thought it was
the be-all and end-all of simulation frameworks.  Swarm is one possible way
of doing things, and there are many others.

The important thing is to advance the field and make things easier for
researchers, not to impose some arbitrary, de facto standard for simulation
from the outset.  Where would we be if work on OO languages had stopped
with Simula?  Where would we be if everone had to use MS Windows and C++?
(Not that this resembles current reality at all :)

Anyway, keep up the good work!
-Ted

PS How's the documentation coming? ;)



At 2:38 AM -0600 10/21/96, Manor Askenazi wrote:
>------------------------------------------------------------------------
>
>This message is meant primarily for those who asked to have Swarm ported
>to Java... I have a question for you, which I'm not clear about.
>
>------------------------------------------------------------------------
>
>I was going through the Java language definition and I couldn't find a
>way to separate a message from the target object to which it should be
>sent, in other words, I wasn't able to find a way to do the equivalent
>of:
>
>  Objective-C
>  -----------
>
>  // Note: This sort of thing is crucial for a general-purpose
>  // simulation framework (i.e. a simulation environment that
>  // doesn't need recompilation whenever a user adds new classes
>  // of simulated objects)...
>
>  -createEventFor: anObject Do: (SEL) aSelector {
>
>    return [anObject perform: aSelector] ;
>
>  }
>
>
>  Java
>  ----
>
>  createEventFor(Object anObject, XXX theMethod){
>    anObject.theMethod() ;   // how...?
>  }
>
>  Note: It is illegal to declare anObject of class Object, so we already
>        have to be more specific, but in any case, I couldn't find what
>        I should write instead of XXX... Unless I'm missing something
>        obvious, Java is much more strongly typed than I thought, and
>        consequently there is no way for us to implement a general-purpose
>        schedule class.
>
>Have I missed something obvious???
>
>Regards,
>
>Manor.


--
Ted Belding                      <mailto:address@hidden>
University of Michigan Program for the Study of Complex Systems
<http://www-personal.engin.umich.edu/~streak/>




reply via email to

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