OO vs. CO

Jay Nelson jay@REDACTED
Fri Mar 7 05:17:04 CET 2003


 > In Inform, objects are basically static, reacting only when
 > acted upon. But any object (up to 16 total IIRC :) can be
 > assigned a "daemon" which gives it behaviour independent
 > of the player/observer.

In Symbolics Flavors (a Lisp-based object system) they  had
"mixins".  It was a bundle of behaviours that could be used for
multiple inheritance, similar to Java interfaces but not so
restricted.  You could mixin printable behaviour, or persistence,
or anything else that was generically useful across object
classes.

Someone pointed out earlier there are two kinds of OO
approaches, the inheritance kind and the prototype kind.
With inheritance the class hierarchy is important.  With
prototypes, you stamp out instances of data structure and
behaviour, but they are disconnected from the hierarchy
but could still communicate with each other.  erlang is closer
to the prototype kind.  Ruby tries to combine the best
features of the two, allowing a class definition to be reopened
and modified affecting all instances (although I forget if it is
time-dynamic and does not affect prior instances), as well as
allowing a single instance to have features that other members
of the same class don't have. I believe the roots of prototype-
based class languages come from Simula in the 70s which
was used for simulation by modeling instances of independent
entities.  erlang would make a great simulation language (even
to the level of doing something like a microprocessor emulator)
because you can model the time delays, feedback loops and
other interactions besides just the instances.

jay
  




More information about the erlang-questions mailing list