Martti Halminen <email@example.com> wrote:
| Some pointers to Simula information:
Ah, yes. Some of us still have fond memories for Simula. Also see
POOMAS: Poor Man's SIMULA, Version: 1, June 1972
Abstract: POOMAS is a collection of subroutines, macros,
etc. which allow a programmer to write SIMULA-like simulation
programs in BLISS. The POOMAS routines will handle queues,
sequencing, random number generation, etc.
It used the BLISS built-in "EXCHJ" (exchange jump) coroutine call
operator for light-weight threads, since each Simula object was
also (potentially) a thread.
In 1983, Bakul Shah & I (at Fortune Systems) built a set of C libraries
[presented at USENIX 1984] that did almost the same thing as POOMAS, and
used them for simulations somewhat in the spirit of Simula. An "object"
was a coroutine or "thread", that is, some subroutine with an (potentially)
infinite loop in it [that provided the behavior of the object] and a piece
of heap-allocated stack [that provided the state of the object, or instance
slots, if you prefer]. Library calls could "wake" other threads/"objects",
or could "sleep" waiting for events or the passage of (simulated) time --
any such sleep of course resulted in a coroutine call to the next available
thread/object that was ready to run. During their lives, objects could
create (and destroy) other objects, emit or receive messages, etc., etc.
So you definitely *can* do "object-oriented programming" in C... ;-} ;-}
Rob Warnock, 31-2-510 firstname.lastname@example.org
Network Engineering http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. PP-ASEL-IA
Mountain View, CA 94043