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/06/27 14:28] jorgeat:tutorial:objects [2007/06/29 08:11] jorge
Line 24: Line 24:
  
 <note important> <note important>
-Note that AmbientTalk not only supports traditional canonical syntax (e.g. ''o.m(a,b,c)'') but also keyworded syntax (e.g. ''o.at: key put: value'') for method definitions and message sends, as in SmallTalk.+AmbientTalk not only supports traditional canonical syntax (e.g. ''o.m(a,b,c)'') but also keyworded syntax (e.g. ''o.at: key put: value'') for method definitions and message sends, as in SmallTalk.
 </note> </note>
  
Line 37: Line 37:
  
 ===== Sending messages ===== ===== Sending messages =====
-In AmbientTalk, computation is expressed in terms of objects sending messages to one another. Messages are used to invoke  +In AmbientTalk, computation is expressed in terms of objects sending messages to one another. Messages are used to invoke the fields and methods of the objects.
- +
-access to  +
- +
-access to the fields and methods of the objects.  +
- +
-Object's fields and methods are accessed as follows:+
  
 <code> <code>
Line 52: Line 46:
 </code> </code>
  
 +This code shows two messages sent to the ''aPoint'' object defined above in this section. The ''x'' message acts as an accessor for the ''x'' field. The ''sumOfSquares'' message select the ''sumOfSquares'' method evaluates its body.
  
 ===== Cloning and instantiation ===== ===== Cloning and instantiation =====
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem