What Price for Eliminating Expression Side-effects?
Name
MIT-LCS-TM-281.pdf
Size
9.8 MB
Format
Adobe PDF
Checksum (MD5)
c43eeae07ccff851c11e9df0c4ad40b0
Author(s)
Hailperin, Max
Date Issued
June 1985
Series/Report no.
MIT-LCS-TM-281
Abstract
Separating a programming language into side-effect-free expressions and effect-only statements should make the language more amenable to axiomatization, as well as providing benefits for style, pedagogy, and implementation efficiency (particularly in parallel-computing environments). This paper shows that such a division does not come at an unreasonable cost in programming convenience. First a dialect of Lisp is defined, in which a distinction is made between statements, which may have side-effects, and expressions, which may not. Next, a representative collection of examples from Abelson and Sussman's Structure and Interpretation of Computer Programs is coded in this dialect of Lisp. Most of the examples divide neatly into functional and imperative portions, and a few relatively clean transformations prove sufficient for the more stubborn cases.
Persistent DSpace Link