This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
at:tutorial:metaprogramming [2007/04/19 16:29] stimberm |
at:tutorial:metaprogramming [2009/11/21 07:44] tvcutsem |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | ||
- | ===== Metaprogramming ===== | ||
- | |||
- | ==== AT Zero - AmbientTalk without syntactic sugar ==== | ||
- | |||
- | ==== Quasiquoting and splicing ==== | ||
- | |||
- | In AmbientTalk, | ||
- | |||
- | Quoting and expression is done with the '' | ||
- | < | ||
- | >`3 == 3 | ||
- | >> | ||
- | >`3 + 8 | ||
- | >>11 | ||
- | > | ||
- | >> | ||
- | </ | ||
- | |||
- | Quoting an identifer results in a symbol: | ||
- | < | ||
- | >foo | ||
- | Undefined variable access: foo | ||
- | >`foo | ||
- | >>foo | ||
- | </ | ||
- | |||
- | < | ||
- | >def o := object: { def m() { 5 } } | ||
- | >>< | ||
- | >o.m() | ||
- | >>5 | ||
- | > | ||
- | >> | ||
- | </ | ||
- | |||
- | ==== First-class abstract grammar ==== |