Metaprogramming: Difference between revisions

Content deleted Content added
→‎{{header|Common Lisp}}: The math notation should show the quantifiers.
m sort headers
Line 50: Line 50:
printf("%f %d %ll\n", my_min(0.0f, 1.0f), my_min(1,2), my_min(1ll, 2ll));
printf("%f %d %ll\n", my_min(0.0f, 1.0f), my_min(1,2), my_min(1ll, 2ll));
</lang>
</lang>

=={{header|E}}==

Forms of metaprogramming existant in E:

* ''Quasi-literals'' provide convenient notation for data structures and values for which there is not literal syntax, as discussed in [[String#E]].
* E program fragments may be quoted, manipulated as an AST, and evaluated, similarly to Lisp; lexical environments are first-class objects (though static with respect to the evaluated code). Demonstrated in [[Runtime evaluation#E]] and [[Eval in environment#E]].
* Control structures may be defined, as demonstrated in [[Extend your language#E]].


=={{header|Common Lisp}}==
=={{header|Common Lisp}}==
Line 192: Line 184:
(funcall embedded-xformer intermediate-state)))))
(funcall embedded-xformer intermediate-state)))))
:unit ((x) (lambda (s) (values x s))))</lang>
:unit ((x) (lambda (s) (values x s))))</lang>

=={{header|E}}==

Forms of metaprogramming existant in E:

* ''Quasi-literals'' provide convenient notation for data structures and values for which there is not literal syntax, as discussed in [[String#E]].
* E program fragments may be quoted, manipulated as an AST, and evaluated, similarly to Lisp; lexical environments are first-class objects (though static with respect to the evaluated code). Demonstrated in [[Runtime evaluation#E]] and [[Eval in environment#E]].
* Control structures may be defined, as demonstrated in [[Extend your language#E]].


=={{header|J}}==
=={{header|J}}==