Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having a hard time finding words to express how interesting of a topic Mr. Schafmeister is working on!

I’m playing around with compilation, self-studying during weekends. I want to learn how to compile Closures from my small Lambda Calculus language into something like C++. “Baby’s first FP codegen”, or the like.

I have struggled to find reading material for the intermediate beginner on this subject. So, if anyone on HN has a favourite link on the web about compiling functional languages, please feel free to share them.



Here's a book dedicated to compiling closures to C:

http://t3x.org/clc/index.html

It starts with lambda calculus and ends with compiling a tiny Scheme subset to portable C code.


You might want to look at Ferret (https://github.com/nakkaya/ferret), which compiles a subset of Clojure to C++, it could be useful to help you understand. It's also written in a literate style, so it's also well-explained.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: