11---
22layout : doc-page
3- title : " Symmetric Meta Programming"
3+ title : " Principled Meta Programming"
44---
55
6- # Symmetric Meta Programming
6+ # Principled Meta Programming
77
8- Symmetric meta programming is a new framework for staging and for some
8+ Principled meta programming is a new framework for staging and for some
99forms of macros. It is expressed as strongly and statically typed
1010code using two fundamental operations: quotations and splicing. A
1111novel aspect of the approach is that these two operations are
@@ -16,7 +16,7 @@ splices in exactly the same way.
1616
1717### Quotes and Splices
1818
19- Symmetric meta programming is built on two well-known fundamental
19+ Principled meta programming is built on two well-known fundamental
2020operations: quotation and splicing. Quotation is expressed as
2121` '(...) ` or ` '{...} ` for expressions (both forms are equivalent) and
2222as ` '[...] ` for types. Splicing is expressed as a prefix ` ~ ` operator.
@@ -113,13 +113,13 @@ create nor remove quotes or splices individually. So the PCP ensures
113113that program elaboration will lead to neither of the two unwanted
114114situations described above.
115115
116- In what concerns the range of features it covers, symmetric meta programming is
116+ In what concerns the range of features it covers, principled meta programming is
117117quite close to the MetaML family of languages. One difference is that MetaML does
118118not have an equivalent of the PCP - quoted code in MetaML _ can_ access
119119variables in its immediately enclosing environment, with some
120120restrictions and caveats since such accesses involve serialization.
121121However, this does not constitute a fundamental gain in
122- expressiveness. Symmetric meta programming allows to define a ` Liftable `
122+ expressiveness. Principled meta programming allows to define a ` Liftable `
123123type-class which can implement such accesses within the confines of the
124124PCP. This is explained further in a later section.
125125
@@ -307,7 +307,7 @@ Here’s an application of `map` and how it rewrites to optimized code:
307307
308308### Relationship with Inline and Macros
309309
310- Seen by itself, symmetric meta-programming looks more like a
310+ Seen by itself, principled meta-programming looks more like a
311311framework for staging than one for compile-time meta programming with
312312macros. But combined with Dotty’s ` inline ` it can be turned into a
313313compile-time system. The idea is that macro elaboration can be
0 commit comments