cs252r : Advanced Functional Programming - Fall 2006
These pages are a record of the in-class discussions for the graduate class "Advanced Functional Programming" given at Harvard University in the Fall of 2006.December 15, 2006
- Imperative functional programming. Simon L. Peyton Jones and Philip Wadler.
- The essence of compiling with continuations. Cormac Flanagan and Amr Sabry and Bruce F. Duba and Matthias Felleisen.
- Generics for the masses. Ralf Hinze.
- Practical type inference for arbitrary-rank types. Simon Peyton Jones and Dimitrios Vytiniotis and Stephanie Weirich and Mark Shields.
- Lazy functional state threads. John Launchbury and Simon L. Peyton Jones.
- Type inference with constrained types. Martin Odersky and Martin Sulzmann and Martin Wehr.
- Composing contracts: an adventure in financial engineering (functional pearl). Simon Peyton Jones and Jean-Marc Eber and Julian Seward.
- Why dependent types matter. James McKinna.
The advocates and detractors for each paper are:
'Generics for the Masses'
for : Andrei Lapets
against : Geoff Mainland
'Practical Type Inference for Arbitrary-Rank Types'
for : Ryan Wisnesky
against : Andrei Lapets
'Imperative Functional Porgramming'
for : Avi Shinnar
against : Ryan Wisnesky
'The Essence of Compiling with Continuations'
for : Geoff Mainland
against : Avi Shinnar
Generics for the Masses
Points in Favor:
- Provides a good, and unexpected use of type classes.
- Multiple simple, concrete examples of generic functions, with trade offs.
- Easy entrance to generic programming "for free".
- Provides good insight into the isomorphism between data types and sums of products.
- Give reader a "feeling" for the relationship between generics and type classes (in particular, riefying types as values).
Points Against:
- This is a nice pearl, but there is nothing essentially new here.
- There is a lot of boilerplate code to write.
- Multiple isomorphism may be required.
- Why is this "generic"?
Practical Type Inference for Arbitrary-Rank Types
Points in Favor:
- Paper is very mature, and is very solid:
- Supported by lots of theorems
- Supported by years old implementation (GHC)
- Paper is self-contained: "all you need to know to implement type inference".
- Demonstrates a large gain in expressive power, at relatively low cost over normal Hindley-Milner inference.
- Tutorial style is very readable and easy to understand.
- Five type systems in one framework.
Points Against:
- On page 17, skolemization discussion is probably "non-sense".
- Motivation not commensurate with length of paper.
- Type constraints are solved left-to-right, and confuses error messages.
Imperative Functional Porgramming
Points in Favor:
- Makes purely functional languages practical.
- Monads = Side effects + equational reasoning.
- Introduces a compositional mechanism for side-effecting computations.
- Easy to extend with new control structures.
- Paper is easily understandable, compelling, well written and has convincing examples.
Points Against:
- Compositionality is questionable:
- How do you get out of a monad?
- How do you combine monads?
- Everything goes into the IO monad
- The practicality is questionable: in effect libraries must be written to be used in the IO monad.
The Essence of Compiling with Continuations
Points in Favor:
- Provides a rigorous, formal basis for understanding practice
- Careful transformation between abstract machines and precise claims.
- Revealed deep connections between ideas and practices previously handled informally.
- Provides a new, simpler IR that still supports transforms.
- Tour de force of proof technique
- Wholesale adoption in practice.
Points Against:
- Some unclarity, in particularly in figure 7.
- Not quite as expressive as CPS, and distinction not well explained.
Results of Voting