1. 12

  2. 4

    This reminds me of the Qi programming language from a few years back. Can’t find that any more, but it looks like it evolved into Shen.

    1. 4

      Interesting about adding lazy evaluation into lisp. From my recollection the original implementation of the idea (in a research paper) was in a lisp.

      Henderson, Peter; Morris, James H. (January 1976). “A Lazy Evaluator”. Conference Record of the Third ACM Symposium on Principles of Programming Languages

      1. 5

        Yes, it appears that lazy evaluation was invented by Lispers (with two independent implementations of lazy Lisp both described in papers published January 1976).

        See also “A History of Haskell:Being Lazy With Class” https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf?from=https%3A%2F%2Fresearch.microsoft.com%2F%7Esimonpj%2Fpapers%2Fhistory-of-haskell%2Fhistory.pdf

        Quote: “Lazy evaluation appears to have been invented independently three times.”

        Another paper about an implementation of lazy evaluation in Lisp, also published January 1976, but by different researchers, was “CONS should not Evaluate its Arguments”. https://help.luddy.indiana.edu/techreports/TRNNN.cgi?trnum=TR44

        The third invention of lazy evaluation was in SASL, an ancestor of Haskell. SASL was redesigned to be lazy in 1976. My earliest reference for lazy SASL is “The SASL Language Manual”, December 1976, by David Turner. I believe that Haskell inherits its laziness from SASL

        Prior to this, there was “Correct and Optimal Implementations of Recursion in a Simple Programming Language” in 1974 by Jean Vuillemin. This paper explains the theoretical benefits of lazy evaluation in Lisp (some recursive programs do not diverge if they are lazy). But the author doesn’t appear to have implemented it. And the paper misses the key idea of lazy evaluation, which is that after you evaluate the thunk the first time, you replace it with its value. So the thunk is evaluated at most once. This paper instead talks about “call by name” (from the Algol 60 language) which evaluates the thunk each time it is used.

        1. 1

          Thanks yes. I’m guilty of simplifying down to one paper because it’s from my own school :)

      2. 2

        People here might also be interested in Coalton (library that embeds ML in Common Lisp)