Lisp macros and read work because of a bug in the original definition of Lisp
M-LISP is a new LISP dialect that integrates operational semantics with metalinguistic features, addressing inconsistencies through eval and reify operators while enhancing the understanding of LISP's semantics and functional programming.
Read original articleThe paper introduces M-LISP, a representation-independent dialect of LISP that aims to reconcile LISP's metalinguistic capabilities with operational semantics as proposed by Plotkin. It begins by analyzing the original definition of LISP to identify the source of its metalinguistic power, which is attributed to a problematic clause. M-LISP is defined with an abstract syntax and operational semantics that combine elements of M-expression LISP and Scheme. The authors connect the operational semantics to equational logic, demonstrating that provable equality in the logic implies operational equality. M-LISP is further extended with metalinguistic operators, eval and reify, which facilitate representation conversions. However, the naive implementations of these operators lead to inconsistencies in LISP's equational logic. The paper shows that a restricted version of the eval operator maintains confluence and serves as a conservative extension of M-LISP, while the reify operator necessitates a weakened logic to achieve consistency. This work clarifies the origins of LISP's metalinguistic power, proposes a formal semantics for M-LISP, and contributes significantly to the understanding of LISP and functional programming languages.
- M-LISP is a new dialect of LISP that integrates operational semantics with metalinguistic features.
- The paper identifies a problematic clause in LISP's original definition as the source of its metalinguistic power.
- M-LISP combines elements of M-expression LISP and Scheme, establishing a formal operational semantics.
- The introduction of eval and reify operators in M-LISP addresses metalinguistic representation but leads to inconsistencies.
- The study enhances the understanding of LISP's semantics and its implications for functional programming languages.
Related
Grokking the Sequent Calculus (Functional Pearl)
The paper introduces the lambda-mu-mu-calculus as a term assignment system for the sequent calculus, emphasizing its symmetry and suitability for compiler intermediate languages. It targets a broader audience and will be presented at ICFP '24.
Mistaking Engineering Achievements for Human Linguistic Agency
Abeba Birhane and Marek McGann's paper challenges assumptions about Large Language Models (LLMs), emphasizing the dynamic nature of language and critiquing claims of LLM linguistic capabilities. They caution against overstating LLM agency.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."
Lisp 3rd Edition (Winston and Horn)
LISP, authored by Patrick Henry Winston and Berthold Klaus Paul Horn, is a comprehensive textbook on the Lisp programming language, covering various applications and recognized for its educational value in computer science.
Ask HN: Why do people say "Lisp has no syntax"? It has infinite syntax
The author discusses Lisp's syntax, highlighting its list-based structure and challenges with constructs like `cond`. They conclude that Lisp's complexity resembles other languages, despite its unique features.
Related
Grokking the Sequent Calculus (Functional Pearl)
The paper introduces the lambda-mu-mu-calculus as a term assignment system for the sequent calculus, emphasizing its symmetry and suitability for compiler intermediate languages. It targets a broader audience and will be presented at ICFP '24.
Mistaking Engineering Achievements for Human Linguistic Agency
Abeba Birhane and Marek McGann's paper challenges assumptions about Large Language Models (LLMs), emphasizing the dynamic nature of language and critiquing claims of LLM linguistic capabilities. They caution against overstating LLM agency.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."
Lisp 3rd Edition (Winston and Horn)
LISP, authored by Patrick Henry Winston and Berthold Klaus Paul Horn, is a comprehensive textbook on the Lisp programming language, covering various applications and recognized for its educational value in computer science.
Ask HN: Why do people say "Lisp has no syntax"? It has infinite syntax
The author discusses Lisp's syntax, highlighting its list-based structure and challenges with constructs like `cond`. They conclude that Lisp's complexity resembles other languages, despite its unique features.