3 ms·
The SPJ book is from 1987, so more than 3 decades old. There has been quite a bit of progress in compilers since. While I'm not up to scratch on the latest vers
by YorkshireSeason 8y ago
The SPJ book is from 1987, so more than 3 decades old. There has been quite a bit of progress in compilers since. While I'm not up to scratch on the latest version of the GHC compiler, it's quite a bit different. I recommend looking at Peyton Jones and Marlow's overview article [1]. The Scala compiler(s) are also interesting. I'm not aware of an overview article, but I found last year's [2] worth reading.
A big breakthrough in the compilation of functional languages was
Xavier Leroy's on (O)Caml. I am not aware of any recent descriptions, but maybe [3, 4] are better than nothing.
Note that languages like Javascript have full functional sublanguages, so all recent progress in JIT compilation for Javascript could/should be considered here too.
Historically, the main issue in the compilation of FP languages has been laziness. In a statically-scoped call-by-value language, compilation is not that different from compilation of 'normal' languages.
[1] S. Marlow, S. Peyton-Jones, The Glasgow Haskell Compiler. http://www.aosabook.org/en/ghc.html http://www.aosabook.org/en/ghc.html
[2] D. Petrashko, O. Lhotak, M. Odersky, Miniphases: Compilation using Modular and Efficient Tree Transformations. https://infoscience.epfl.ch/record/228518/files/paper.pdf https://infoscience.epfl.ch/record/228518/files/paper.pdf
[3] X. Leroy, Functional programming languages Part II: abstract machines.
[4] X. Leroy, The ZINC experiment: an economical implementation of the ML language.