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/06/27 14:26] – jorge | at:tutorial:objects [2007/06/29 08:11] – jorge | ||
---|---|---|---|
Line 21: | Line 21: | ||
</ | </ | ||
- | As all definitions in AmbientTalk, | + | As all definitions in AmbientTalk, |
+ | |||
+ | <note important> | ||
+ | AmbientTalk not only supports traditional canonical syntax (e.g. '' | ||
+ | </ | ||
+ | |||
+ | In the example above, the state of the '' | ||
< | < | ||
Line 28: | Line 34: | ||
</ | </ | ||
- | Every object understands the message '' | + | Every object understands the message '' |
- | + | ||
- | <note important> | + | |
- | AmbientTalk supports both traditional canonical syntax (e.g. '' | + | |
- | </ | + | |
- | + | ||
- | AmbientTalk’s object instantiation protocol closely corresponds to class instantiation in class-based languages, except that the new object is a clone of an existing object, rather than an empty object allocated from a class. We further explain the semantics of object cloning in subsection [[objects# | + | |
===== Sending messages ===== | ===== Sending messages ===== | ||
- | In AmbientTalk, | + | In AmbientTalk, |
- | + | ||
- | access to | + | |
- | + | ||
- | access to the fields and methods of the objects. | + | |
- | + | ||
- | Object' | + | |
< | < | ||
Line 52: | Line 46: | ||
</ | </ | ||
+ | This code shows two messages sent to the '' | ||
===== Cloning and instantiation ===== | ===== Cloning and instantiation ===== |
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem