[Python-3000] Another way to understand static metaprogramming in functional languages

Talin talin at acm.org
Wed May 2 05:38:31 CEST 2007

Guido was complaining to me today, something along the lines that every 
time someone presents him with an example of Haskell code, his eyes 
start glazing over. I have pretty much the same problem, even though 
I've actually taken the time to read a little bit about Haskell.

If you are someone who is interested in how the magic of static 
metaprogramming in functional languages can work, but find Haskell code 
hard to read, then I strongly recommend Graydon Hoare's "One Day 
Compilers" presentation:


This is a slideshow that shows how to build a simple compiler in one day 
in OCAML. The slideshow is easy to read, and covers a brief introduction 
to OCAML (which is similar to Haskell in spirit) as well as details of 
how to construct the compiler. There's lots of stuff in there on how to 
use manipulation of types to get things done fast.

-- Talin

More information about the Python-3000 mailing list