User Tools

Site Tools


at:tutorial:objects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
at:tutorial:objects [2007/07/10 12:46] – fixed tvcutsemat:tutorial:objects [2007/07/10 21:52] – small tvcutsem
Line 120: Line 120:
 This cloning semantics reinforces the semantics of **IS-A** as promoting a unique link between a parent and a child object. **IS-A** delegation most closely corresponds to class-based inheritance. This cloning semantics reinforces the semantics of **IS-A** as promoting a unique link between a parent and a child object. **IS-A** delegation most closely corresponds to class-based inheritance.
  
-===== Delegation and dynamic inheritance ===== +===== Delegation and Dynamic Inheritance ===== 
-The parent of an object is bound to field named ''super''. The delegation chain defined by an object and its parent (or chain of parents) determines the scope in which the message is looked up. As any field in AmbientTalk objects, the ''super'' field can be dynamically modified.+ 
 +In AmbientTalk, all objects delegate messages they cannot understand to the object stored in their field named ''super''. The delegation chain defined by an object and its parent (or chain of parents) determines the scope in which message is looked up. For ex-nihilo created objects, like the ''Point'' object defined previously, the ''super'' slot is by default set to ''nil''. When a message is finally delegated all the way up to ''nil'', ''nil'' informs the original receiver of the message of the failed lookup, which by default reports the error by means of a ''SelectorNotFound'' exception. 
 + 
 +As any field in AmbientTalk objects, the ''super'' field can be dynamically modified.
  
 <code> <code>
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem