M-expression
In Lisp programming language, M-expressions (or meta-expressions) were an early proposed syntax for the Lisp, inspired by contemporary languages such as Fortran and ALGOL. The notation was never implemented into the language and, as such, it was never finalized.
In Lisp programming language, M-expressions (or meta-expressions) were an early proposed syntax for the Lisp, inspired by contemporary languages such as Fortran and ALGOL. The notation was never implemented into the language and, as such, it was never finalized. ==Background== John McCarthy published the first paper on Lisp in 1960 while a research fellow at the Massachusetts Institute of Technology. In it he described a language of symbolic expressions (S-expressions) that could represent complex structures as lists. Then he defined a set of primitive operations on the S-expressions, and a language of meta-expressions (M-expressions) that could be used to define more complex operations. Finally, he showed how the meta-language itself could be represented with S-expressions, resulting in a system that was potentially self-hosting. The draft version of this paper is known as "AI Memo 8". McCarthy had planned to develop an automatic Lisp compiler (LISP 2) using M-expressions as the language syntax and S-expressions to describe the compiler's internal processes. Stephen R. Russell read the paper and suggested to him that S-expressions were a more convenient syntax. Although McCarthy disapproved of the idea, Russell and colleague Daniel J. Edwards hand-coded an interpreter program that could execute S-expressions. This program was adopted by McCarthy's research group, establishing S-expressions as the dominant form of Lisp. McCarthy reflected on the fate of M-expressions in 1979: The book Anatomy of LISP by John Allen explains the definition of M-expressions and uses them throughout the book to explain Lisp and its implementation. apply[fn;x;a] = [atom[fn] → [eq[fn;CAR] → caar[x]; eq[fn;CDR] → cdar[x]; eq[fn;CONS] → cons[car[x];cadr[x ; eq[fn;ATOM] → atom[car[x ; eq[fn;EQ] → eq[car[x];cadr[x ; T → apply[eval[fn;a];x;a ; eq[car[fn];LAMBDA] → eval[caddr[fn];parlis[cadr[fn];x;a ; eq[car[fn];LABEL] → apply[caddr[fn];x;cons[cons[cadr[fn];caddr[fn ;a ] eval[e;a] = [atom[e] → cdr[assoc[e;a ; atom[car[e → [eq[car[e],QUOTE] → cadr[e]; eq[car[e];COND] → evcon[cdr[e];a]; T → apply[car[e];evlis[cdr[e];a];a ; T → apply[car[e];evlis[cdr[e];a];a Using the function eval on an s-expression. eval[(EQ (QUOTE A) (CAR (CONS (QUOTE A) (QUOTE (B C D)))));NIL] ==Further development== A CGOL (1977) was implemented in MacLisp and follows a similar goal of introducing Algol-like syntax with infix operators. It is known to work on Armed Bear Common Lisp. A more recent (circa 2003) variant is the I-expression, which use indentation to indicate parentheses implicitly, and are thus in some ways intermediate between S-expressions and M-expressions. I-expressions were introduced in Scheme Request For Implementation 49 as an auxiliary syntax for Scheme, but they have not been widely adopted. A further development is the "sweet" t-expression, which has infix operators without precedence. Like I-expressions, t-expressions are only a simple transformation away from S-expressions, so that theoretically they can be used on any Lisp dialect and not interfere with features like macros. Additional syntax-related include Apple's Dylan (Algol-like tokens) and Clojure's addition of other literal syntaxes. ==Notes== ==References==
References
- The implementation of LISP · retrieved 2020-03-28 · rev 1362049904
Cite this reference
MLA "The implementation of LISP." 2020-03-28. http://www-formal.stanford.edu/jmc/history/lisp/node3.html. Accessed 24 November 2026.
Chicago "The implementation of LISP." 2020-03-28. http://www-formal.stanford.edu/jmc/history/lisp/node3.html.
APA encyclopegia.org. (2020). The implementation of LISP. Retrieved November 24, 2026, from http://www-formal.stanford.edu/jmc/history/lisp/node3.html
- SRFI 49: Indentation-sensitive syntax · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "SRFI 49: Indentation-sensitive syntax." Möller, Egil (2003). 2026-11-21. http://srfi.schemers.org/srfi-49/srfi-49.html. Accessed 24 November 2026.
Chicago "SRFI 49: Indentation-sensitive syntax." Möller, Egil (2003). 2026-11-21. http://srfi.schemers.org/srfi-49/srfi-49.html.
APA Möller, Egil (2003). (2026). SRFI 49: Indentation-sensitive syntax. Retrieved November 24, 2026, from http://srfi.schemers.org/srfi-49/srfi-49.html
- SRFI 110: Sweet-expressions (t-expressions) · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "SRFI 110: Sweet-expressions (t-expressions)." Wheeler, DA (2013). 2026-11-21. https://srfi.schemers.org/srfi-110/srfi-110.html. Accessed 24 November 2026.
Chicago "SRFI 110: Sweet-expressions (t-expressions)." Wheeler, DA (2013). 2026-11-21. https://srfi.schemers.org/srfi-110/srfi-110.html.
APA Wheeler, DA (2013). (2026). SRFI 110: Sweet-expressions (t-expressions). Retrieved November 24, 2026, from https://srfi.schemers.org/srfi-110/srfi-110.html
- Recursive Functions of Symbolic Expressions and Their Computation by Machine (AI Memo 8) · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "Recursive Functions of Symbolic Expressions and Their Computation by Machine (AI Memo 8)." McCarthy, John (March 1959). 2026-11-21. https://web.archive.org/web/20210307145003/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html. Accessed 24 November 2026.
Chicago "Recursive Functions of Symbolic Expressions and Their Computation by Machine (AI Memo 8)." McCarthy, John (March 1959). 2026-11-21. https://web.archive.org/web/20210307145003/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html.
APA McCarthy, John (March 1959). (2026). Recursive Functions of Symbolic Expressions and Their Computation by Machine (AI Memo 8). Retrieved November 24, 2026, from https://web.archive.org/web/20210307145003/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html
- The implementation of LISP · retrieved 2013-08-23 · rev 1362049904
Cite this reference
MLA "The implementation of LISP." 2013-08-23. http://www-formal.stanford.edu/jmc/history/lisp/node3.html. Accessed 24 November 2026.
Chicago "The implementation of LISP." 2013-08-23. http://www-formal.stanford.edu/jmc/history/lisp/node3.html.
APA encyclopegia.org. (2013). The implementation of LISP. Retrieved November 24, 2026, from http://www-formal.stanford.edu/jmc/history/lisp/node3.html
- A Parser for M-Expressions · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "A Parser for M-Expressions." 2026-11-21. https://web.archive.org/web/20210324084457/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/. Accessed 24 November 2026.
Chicago "A Parser for M-Expressions." 2026-11-21. https://web.archive.org/web/20210324084457/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/.
APA encyclopegia.org. (2026). A Parser for M-Expressions. Retrieved November 24, 2026, from https://web.archive.org/web/20210324084457/https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/
- Anatomy of LISP · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "Anatomy of LISP." 2026-11-21. https://dl.acm.org/doi/10.5555/542865. Accessed 24 November 2026.
Chicago "Anatomy of LISP." 2026-11-21. https://dl.acm.org/doi/10.5555/542865.
APA encyclopegia.org. (2026). Anatomy of LISP. Retrieved November 24, 2026, from https://dl.acm.org/doi/10.5555/542865
- LISP 1.5 Programmer's Manual · retrieved 2013-09-01 · rev 1362049904
Cite this reference
MLA "LISP 1.5 Programmer's Manual." a b "LISP 1. 2013-09-01. https://web.archive.org/web/20060211020233/http://community.computerhistory.org/scc/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf. Accessed 24 November 2026.
Chicago "LISP 1.5 Programmer's Manual." a b "LISP 1. 2013-09-01. https://web.archive.org/web/20060211020233/http://community.computerhistory.org/scc/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf.
APA a b "LISP 1. (2013). LISP 1.5 Programmer's Manual. Retrieved November 24, 2026, from https://web.archive.org/web/20060211020233/http://community.computerhistory.org/scc/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
- CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. Wikipedia revision 1362049904, retrieved 2026-11-22 · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. Wikipedia revision 1362049904, retrieved 2026-11-22." CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. 2026-11-21. http://abcl-dev.blogspot.co.uk/2010/04/cgol-on-abcl.html. Accessed 24 November 2026.
Chicago "CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. Wikipedia revision 1362049904, retrieved 2026-11-22." CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. 2026-11-21. http://abcl-dev.blogspot.co.uk/2010/04/cgol-on-abcl.html.
APA CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. (2026). CGOL on ABCL Development of the Armed Bear Common Lisp implementation blog. Wikipedia revision 1362049904, retrieved 2026-11-22. Retrieved November 24, 2026, from http://abcl-dev.blogspot.co.uk/2010/04/cgol-on-abcl.html
- Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I." McCarthy, John (April 1960) "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I" Wikip. 2026-11-21. https://en.wikipedia.org/w/index.php?oldid=1362049904. Accessed 24 November 2026.
Chicago "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I." McCarthy, John (April 1960) "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I" Wikip. 2026-11-21. https://en.wikipedia.org/w/index.php?oldid=1362049904.
APA McCarthy, John (April 1960) "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I" Wikip. (2026). Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1362049904
- LISP Infix Syntax Survey · retrieved 2026-11-21 · rev 1362049904
Cite this reference
MLA "LISP Infix Syntax Survey." a b c Lee, Xah. 2026-11-21. http://xahlee.info/comp/lisp_sans_sexp.html. Accessed 24 November 2026.
Chicago "LISP Infix Syntax Survey." a b c Lee, Xah. 2026-11-21. http://xahlee.info/comp/lisp_sans_sexp.html.
APA a b c Lee, Xah. (2026). LISP Infix Syntax Survey. Retrieved November 24, 2026, from http://xahlee.info/comp/lisp_sans_sexp.html
- M-expression · retrieved 2026-10-19 · rev 1362049904
Cite this reference
MLA "M-expression." Wikipedia. 2026-10-19. https://en.wikipedia.org/w/index.php?oldid=1362049904. Accessed 24 November 2026.
Chicago "M-expression." Wikipedia. 2026-10-19. https://en.wikipedia.org/w/index.php?oldid=1362049904.
APA Wikipedia. (2026). M-expression. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1362049904
Cite this article
MLA
"M-expression." encyclopegia.org, 2026, https://encyclopegia.org/wiki/m-expression. Accessed 24 November 2026.
Chicago
"M-expression." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/m-expression.
APA
encyclopegia.org. (2026). M-expression. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/m-expression
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| publication date | 1960 | Wikipedia |