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 revision
Previous revision
Next revisionBoth sides next revision
at:tutorial:objects [2007/07/02 13:34] jorgeat:tutorial:objects [2007/07/02 13:47] jorge
Line 89: Line 89:
 <code> <code>
 > def openConnection := object: {...}; > def openConnection := object: {...};
-  def closedConnection := object: {...}; +def closedConnection := object: {...}; 
-  def connection := object: {+def connection := object: {
     def open() {     def open() {
       super := openConnection.new();       super := openConnection.new();
Line 99: Line 99:
   }   }
 </code> </code>
 +
 +<note important>
 +In AmbientTalk, ''self'' and ''super'' indicate the current object and its parent respectively. While the former corresponds to a language keyword the latter is just a field name of the object.
 +</note>
  
 ===== First-class delegation ===== ===== First-class delegation =====
-AmbientTalk provides an explicit delegation operator ''^''. The code below illustrates the use of this operator in the implementation of the ''init'' method of the ''point3D'' object.+AmbientTalk provides an explicit delegation operator ''^'' (the "caret" or "hat" symbol). The code below illustrates the use of this operator in the implementation of the ''init'' method of the ''point3D'' object.
  
 <code> <code>
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem