The Kent Recursive Calculator (KRC)
The Kent Recursive Calculator (KRC) was a lazy, untyped, purely functional programming language developed by David Turner at the University of Kent (1979-1981).
The KRC was an immediate successor to SASL. Moreover, it was a direct precursor to Miranda, and consequently influenced the development of Haskell.
In fact, KRC looks eerily similar to Haskell: see e.g. the 1981 prelude (not copied here due to copyright restrictions).
The original paper on the KRC Turner 1981 contains an interesting diss on LISP:
Perhaps I should explain why I don’t teach my students LISP (McCarthy et al. 1962) which is still the language most people first think of when functional programming is mentioned. There are two reasons — the first is that the syntax of LISP is so clumsy that it constitutes a real obstacle to comprehension. Fig. 2 illustrates this with a definition of Ackermann’s function in LISP — note that there are eighteen pairs of parentheses! — and for contrast a definition of the same function in KRC, which looks more like a piece of ordinary mathematics. The second and more serious reason is that the semantics of LISP are rather complicated and include a number of features which could in no sense be regarded as functional. The net effect, at least in my experience, is that as a vehicle for teaching people about functional programming, LISP is apt to cause more confusion than enlightenment and I prefer to avoid using it.
External links
- The open source interpreter of KRC is maintained on codeberg
- A large example of KRC (and Miranda and Haskell) programming is the infinite-precision math library
References
-
A page by David Turner on the KRC, including the sources of original implementation, as well as some bibliographic references.
-
The original paper on the KRC:
@incollection{darlington_recursion_1982,
title = {Recursion {Equations} as a {Programming} {Language}},
booktitle = {Functional programming and its applications: an advanced course},
publisher = {Cambridge University Press},
author = {Turner, D. A.},
editor = {Darlington, J. and Henderson, P. and Turner, D. A.},
year = {1982},
pages = {1--29},
}
It has been reprinted as
@incollection{turner_2016,
address = {Cham},
series = {Lecture {Notes} in {Computer} {Science}},
title = {Recursion {Equations} as a {Programming} {Language}},
volume = {9600},
booktitle = {A {List} of {Successes} {That} {Can} {Change} the {World}},
publisher = {Springer International Publishing},
author = {Turner, D. A.},
editor = {Lindley, Sam and McBride, Conor and Trinder, Phil and Sannella, Don},
year = {2016},
doi = {10.1007/978-3-319-30936-1_24},
pages = {459--478}
}