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 13:34] – jorge | at:tutorial:objects [2007/07/02 14:16] – jorge | ||
---|---|---|---|
Line 89: | Line 89: | ||
< | < | ||
> def openConnection := object: {...}; | > def openConnection := object: {...}; | ||
- | | + | > def closedConnection := object: {...}; |
- | def connection := object: { | + | > def connection := object: { |
def open() { | def open() { | ||
super := openConnection.new(); | super := openConnection.new(); | ||
Line 99: | Line 99: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | <note important> | ||
+ | In AmbientTalk, | ||
+ | </ | ||
===== First-class delegation ===== | ===== First-class delegation ===== | ||
- | AmbientTalk provides an explicit delegation operator '' | + | AmbientTalk provides an explicit delegation operator '' |
< | < | ||
Line 113: | Line 117: | ||
</ | </ | ||
- | A message sent to an object using this symbol (e.g. to the parent object in the example above) will first look for the method | + | A message sent to an object using the '' |
===== Encapsulation ===== | ===== Encapsulation ===== |
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem