User Tools

Site Tools


at:tutorial:appendix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
at:tutorial:appendix [2021/09/24 10:25]
elisag [Structural Types]
at:tutorial:appendix [2021/09/24 10:28] (current)
elisag [Dynamic Variables]
Line 392: Line 392:
 ===== Language Extensions ===== ===== Language Extensions =====
  
-The files in the ''at/lang'' directory define custom language features which mostly use AmbientTalk/2's reflective facilities to extend the language.+The files in the ''at/lang'' directory define custom language features which mostly use AmbientTalk/2's reflective facilities to extend the language. In what follows, we describe the most relevant ones
  
  
Line 532: Line 532:
 Please have a look to [[:uf:totam]] for further details on the model and its API. Please have a look to [[:uf:totam]] for further details on the model and its API.
  
-==== Dynamic Variables ====+===== Dynamic Variables =====
  
 The module ''/.at.lang.dynvars'' provides support for defining and using 'Dynamic Variables'. Dynamic variables 'simulate' dynamically scoped variables and are often used to parameterize large parts of code. For example, the 'current output stream'. A dynamic variable has the advantage over a simple global variable that it can only be assigned a value for the extent of a block of code. The module ''/.at.lang.dynvars'' provides support for defining and using 'Dynamic Variables'. Dynamic variables 'simulate' dynamically scoped variables and are often used to parameterize large parts of code. For example, the 'current output stream'. A dynamic variable has the advantage over a simple global variable that it can only be assigned a value for the extent of a block of code.
Line 610: Line 610:
 More usage examples of structural types can be found in the unit test defined in the file ''at/lang/structuraltypes.at''. More usage examples of structural types can be found in the unit test defined in the file ''at/lang/structuraltypes.at''.
  
-==== Traits ====+===== Traits =====
  
 The module ''/.at.lang.traits'' exports a small library to use AmbientTalk's traits in a more structured manner. In the literature, traits are described as reusable components with two interfaces: an interface of methods that are //provided// by the trait //to// the composite and an interface of methods that are //required// by the trait //from// the composite. AmbientTalk's traits only make the provided interface explicit. The required interface remains implicit and unchecked at composition time. The module ''/.at.lang.traits'' exports a small library to use AmbientTalk's traits in a more structured manner. In the literature, traits are described as reusable components with two interfaces: an interface of methods that are //provided// by the trait //to// the composite and an interface of methods that are //required// by the trait //from// the composite. AmbientTalk's traits only make the provided interface explicit. The required interface remains implicit and unchecked at composition time.
at/tutorial/appendix.1632471925.txt.gz ยท Last modified: 2021/09/24 10:25 by elisag