 
   
  
  
  
 
 Next: Functional Programming
Up: 8.2 Programming: the General 
 Previous: The Elements of Programming
 
 
In a loose sense, Object Oriented Programming is based on the idea
that one deals with a community of communicating objects. ``Pure''
OO languages are based on a quite strong ``message passing'' metaphor,
i.e. computation is the result of sending messages between objects
following clear protocols. From a more local point of view, OO programming
means that each object can send, receive and handle a specific
set of messages. Messages are handled by so-called methods which
do look like ordinary procedures, but can only alter the internal
state of an object or send messages to objects.
Now what is object oriented in LambdaMOO ?
-  All data is stored in objects
-  Objects have single names (the #xxx number in the MOO db). Each
Object has therefore a single identity.
-  Objects maintain internal state (that is the information contained
in the slots)
-  Objects can inherit values (default property values) and methods
(verbs) from other objects. This is in contrast to most OO Languages, 
where inheritance is disciplined by a subclass relation between abstract 
``classes'' that do not function as actual objects - called ``instances''. 
Inheritance in the MOO obeys a simpler scheme, prototype inheritance,
where chosen objects (called ``Generic Objects'' in the MOO) serve as models
for other objects. Generic objects are almost the same as their instances.
-  Inheritance is single, meaning MOO objects can only inherit from
a single Generic Object. However, ``feature objects'' do add some
flexibility to this scheme.
-  Internal states of objects (properties) can be accesses from the outside without any special protocol
(with restrictions, see permissions). That is not ``pure OO style'' either.
 
So the MOO language is object-based but not really really object-oriented
in the strong sense. This does no mean that one can't program relatively
``pure'' OO style, but it certainly is not enforced.
[more to come]
 
  
  
  
  
   
 
 Next: Functional Programming
Up: 8.2 Programming: the General 
 Previous: The Elements of Programming
Daniel K. Schneider 
Thu Apr 17 12:43:52 MET DST 1997