at:tutorial:objects
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
at:tutorial:objects [2007/07/02 12:47] – jorge | at:tutorial:objects [2007/07/02 13:12] – jorge | ||
---|---|---|---|
Line 49: | Line 49: | ||
Every object understands the message '' | Every object understands the message '' | ||
- | AmbientTalk also provides a '' | + | AmbientTalk also provides a '' |
< | < | ||
Line 100: | Line 100: | ||
</ | </ | ||
- | ===== First-class | + | ===== First-class |
+ | AmbientTalk provides an explicit delegation operator '' | ||
+ | < | ||
+ | > def Point3D := extend: Point with: { | ||
+ | def z := 0; | ||
+ | def init(anX, aY, aZ) { | ||
+ | super^init(anX, | ||
+ | z := aZ; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
===== Encapsulation ===== | ===== Encapsulation ===== |
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem