Laziness without all the hard work: combining lazy and strict languages for teaching

Students have trouble understanding the difference between lazy and strict programming. It is difficult to compare the two directly, because popular strict languages and popular lazy languages differ in their syntax, in their type systems, and in other ways unrelated to the lazy/strict evaluation discipline.While teaching programming languages courses, we have discovered that an extension to PLT Scheme allows the system to accommodate both lazy and strict evaluation in the same system. Moreover, the extension is simple and transparent. Finally, the simple nature of the extension means that the resulting system provides a rich environment for both lazy and strict programs without modification.

[1]  Mitchell Wand,et al.  Essentials of programming languages , 2008 .

[2]  Matthias Felleisen,et al.  Fostering Little Languages , 2004 .

[3]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[4]  Matthias Felleisen,et al.  DrScheme: a programming environment for Scheme , 2002, J. Funct. Program..

[5]  John Hughes,et al.  Report on the Programming Language Haskell 98 , 1999 .

[6]  WadlerPhilip,et al.  Report on the programming language Haskell , 1992 .

[7]  M.N. Sastry,et al.  Structure and interpretation of computer programs , 1986, Proceedings of the IEEE.

[8]  Walid Taha,et al.  How to add laziness to a strict language without even being odd , 1998 .

[9]  Shriram Krishnamurthi,et al.  Programming languages - application and interpretation , 2003 .

[10]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[11]  Matthew Flatt,et al.  PLT MzScheme: Language Manual , 2000 .

[12]  Matthew Flatt Composable and compilable macros:: you want it when? , 2002, ICFP '02.

[13]  Harold Abelson,et al.  Revised5 report on the algorithmic language scheme , 1998, SIGP.

[14]  Matthias Felleisen,et al.  On the Expressive Power of Programming Languages , 1990, European Symposium on Programming.

[15]  Matthias Felleisen,et al.  DrScheme: A Pedagogic Programming Environment for Scheme , 1997, PLILP.

[16]  Jonathan Rees,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.