6.8

5 Resources

Racket is a family of languages based on Scheme (and, by extension, Lisp) that provide extensions well beyond the standards for these languages but also break with their precedent in certain ways (notably in making standard lists immutable). The best reference for Racket is found in the browser-readable documentation included with the distribution. The documentation is also available on the Racket website.

The only book based on full Racket and aimed at those with programming experience is Realm of Racket (2013), which adapts the Lisp book "Land of Lisp". Both of these books use a gaming approach. The first-year CS courses at UW (CS 115/135/145) use the teaching languages in the Racket distribution, which are small subsets of Racket. Both the first edition of How To Design Programs (1993) and the second edition (soon from MIT Press) use these teaching languages. Please note that if your only prior exposure to Racket was with the teaching languages, full Racket has certain minor differences which you will need to learn about.

Because of the use of Racket in first year, we will spend very little time on Racket syntax in lecture. If you are in need of a refresher, this tutorial of mine may be helpful.

Winter 2014 was the first offering of CS 442 that made use of OCaml, despite the textbook’s heavy reliance on this language. The OCaml website will be helpful. OCaml is in the ML family of languages. Most previous offerings used SML/NJ, but that language is frozen, whereas OCaml is under active development and has more of an industrial presence. There are a number of small differences in syntax and approach between SML and OCaML, explained here and here. Microsoft’s F# Developer Center has more information on F#, the latest dialect, which adds .NET interoperability.

The OCaml website has links to a number of books and tutorials. I consulted the book Real World OCaml in revising the course for 2015. The entire text is available online; it is well-written and extensive. Be warned that this book uses a nonstandard replacement for the standard library (Core).

Haskell.org is your one-stop shop for all things Haskell. Of particular interest: the Haskell Report, the standard Prelude, its readable definition, and the Hoogle search engine. There’s also a wiki, a blog aggregator, and more tutorials than you can possibly use.

The best book on Haskell for the beginner is Graham Hutton’s "Programming in Haskell". Simon Thompson’s "Haskell: The Craft of Functional Programming" and Paul Hudak’s "The Haskell School of Expression" are also very good. The O’Reilly book "Real-World Haskell" (O’Sullivan, Stewart, Goertzen) is a few years old now, and was a model for the OCaml book mentioned above. If the Haskell book sometimes feels "written by committee" or like "blog posts stapled together", that is more than offset by the fact that it was developed with extensive feedback from the Haskell community and is available online. Another book available online is Learn You A Haskell For Great Good!, which has a breezy, irreverent style, even though the contents are technically solid. This is the one I would recommend as backup for CS 442 if you don’t want to spend any more money.

Much of the core content of "Types and Programming Languages" is reprised in Benjamin Pierce’s latest project, "Software Foundations" (with many co-authors), which provides formal, machine-verified proofs for theorems. This is a good antidote if you think the proofs are trivial or obvious; it turns out to be somewhat tricky to get all the details right.