This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
at:tutorial:multiparadigm [2007/06/19 11:03] tvcutsem |
at:tutorial:multiparadigm [2011/06/07 18:29] tvcutsem *minor |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== On Scoping, Closures, Methods and Messages ====== | ||
- | < | ||
- | |||
- | This tutorial chapter goes into a bit more detail on the subtle interplay between AmbientTalk' | ||
- | |||
- | ===== Scoping ===== | ||
- | |||
- | AmbientTalk distinguishes between two kinds of scoping rules: | ||
- | - the **lexical scope**, which is the traditional scope one assumes when nesting language elements: variables which are lexically visible within an enclosing scope should be accessible within the enclosed scope. | ||
- | - the **object scope**, which is delimited by a chain of delegating objects. When sending a message to an object, the object and its parent objects delimit the scope in which the message is looked up. | ||
- | |||
- | ==== Nesting Objects ==== | ||
- | |||
- | ==== Lexical vs Object Scope ==== | ||
- | |||
- | ==== Methods vs Closures ==== | ||
- | |||
- | ==== External Methods ==== | ||
- | |||
- | ===== First-class Methods ===== | ||
- | |||
- | ===== First-class Messages ===== |