Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Macro (computer science)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Hygienic macros === {{Main article|Hygienic macro}} In the mid-eighties, a number of papers<ref>{{cite conference |last1=Kohlbecker |first1=Eugene |last2=Friedman |first2=Daniel |last3=Felleisen |first3=Matthias |last4=Duba |first4=Bruce |book-title=LFP '86: Proceedings of the 1986 ACM conference on LISP and functional programming |title=Hygienic Macro Expansion |year=1986 |pages=151β161 |doi=10.1145/319838.319859 |isbn=0897912004}}</ref><ref>[http://portal.acm.org/citation.cfm?id=99583.99607] Clinger, Rees. "Macros that Work"</ref> introduced the notion of [[hygienic macro]] expansion (<CODE>syntax-rules</CODE>), a pattern-based system where the syntactic environments of the macro definition and the macro use are distinct, allowing macro definers and users not to worry about inadvertent variable capture (cf. [[referential transparency]]). Hygienic macros have been standardized for Scheme in the [[R5RS]], [[R6RS]], and [[R7RS]] standards. A number of competing implementations of hygienic macros exist such as <code>syntax-rules</code>, <code>syntax-case</code>, explicit renaming, and syntactic closures. Both <code>syntax-rules</code> and <code>syntax-case</code> have been standardized in the Scheme standards. Recently, [[Racket (programming language)|Racket]] has combined the notions of hygienic macros with a "[[tower of evaluators]]", so that the syntactic expansion time of one macro system is the ordinary runtime of another block of code,<ref>{{cite news | last1 = Flatt | first1 = Matthew | title = Composable and compilable macros: you want it when? |url=http://www.cs.utah.edu/plt/publications/macromod.pdf}}</ref> and showed how to apply interleaved expansion and parsing in a non-parenthesized language.<ref>{{cite news | last1 = Rafkind | first1 = Jon | last2 = Flatt | first2 = Matthew | title = Honu: Syntactic Extension for Algebraic Notation through Enforestation |url=http://www.cs.utah.edu/plt/publications/gpce12-rf.pdf}}</ref> A number of languages other than Scheme either implement hygienic macros or implement partially hygienic systems. Examples include [[Scala (programming language)|Scala]], [[Rust (programming language)|Rust]], [[Elixir (programming language)|Elixir]], [[Julia (programming language)|Julia]], [[Dylan (programming language)|Dylan]], [[Nim (programming language)|Nim]], and [[Nemerle]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Macro (computer science)
(section)
Add topic