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:02] jorgeat:tutorial:objects [2007/07/02 13:15] jorge
Line 100: Line 100:
 </code> </code>
  
-===== First-class Delegation =====+===== First-class delegation ===== 
 +AmbientTalk provides an explicit delegation operator ''^'' shown in the code below.
  
 +<code>
 +> def point3D := extend: point with: {
 +    def z := 0;
 +    def init(aX, aY, aZ) {
 +      super^init(aX, aY);
 +      z := aZ;
 +    }
 +  }
 +</code>
  
 ===== Encapsulation ===== ===== Encapsulation =====
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem