Saturday, March 20, 2010

The Implementation of Functional Programming Languages

I'm working on adding pattern matching to Irken. Digging through the OCaml source, I found a reference to this little gem:

"The Implementation of Functional Programming Languages
" (Simon Peyton Jones, published by Prentice Hall, 1987.)

The book is available for free here:

Chapters 4 and 5 cover exactly what I need for pattern matching - in fact, it appears that their algorithm transforms a set of patterns into a tree of 'case' statements where their 'case' construct exactly matches my current 'vcase'. Nice!

How is it that after so many years of trudging through this space, I never knew about this book?

1 comment:

  1. Wow, just randomly flipping through this, I see in section 6.2.8, "Dependency Analysis" he describes how to re-arrange a set of let/letrec expressions by computing the strongly connected components. It's cool that I stumbled across the same technique, but I would have rather read it in this book. 8^)