It is interesting that your compilers class targets the lambda calculus.
While we have a thorough curriculum on functional programming at CMU (and for one class I did write several compilers which took more complex languages and translated them to the lambda calculus and even more minimalistic languages like the SK (optionally I) combinator calculus, that class wasn't on compilers, it was "Principles of Programming Languages". It also covered type theory, implementing type inference, and so on.
Whereas our compilers class covers the sort of topics you would expect in a compiler targeting a real architecture: parsing/lexing, choosing intermediate languages, SSA form, optimizations, register allocation, code generation, and so on. We have a separate class which covers compiling higher order typed languages (SML in particular).
Our compilers class is also unusual (in ones I have seen) in that, instead of building a lexer, building a parser, doing translation, and so on for each stage, as separate projects, rather students build a whole compiler for each assignment. The language compiled gains more and more features: first control flow, then function calls, then memory operations (structs, arrays, heap-allocation).
Might I ask your thinking when choosing the lambda calculus as the basis for your compilers class?
This is more of a meta-comment, but it is always interesting seeing links like this (here on Hacker News and elsewhere) which attract a fair number of upvotes, but no comments.
Perhaps we're all afraid of looking stupid... easier to discuss Job's retirement or something less scary :)
Anyway, to drop down a metalevel, this is fabulous but also interesting for what the lambda calculus doesn't talk about - concurrency and more broadly time. I'd like to see more pages like this but which come from an actor model of computation or some other process calculus.
Matt, I've read several articles on your site and wanted to say thanks for writing them. I'd be very interested in reading an article about compiling to the pi-calculus.
I often find that I want to comment on stories like this to express my enthusiasm for an interesting topic, but yeah I know that by doing so there is the risk that I'll expose myself as being pretty naive & unsophisticated in an advanced subject.
And I'd be doing this in front of a large audience of very intelligent yet potentially ruthless peers ;)
the lambda calculus doesn't talk about concurrency but it does discuss time. like turing machines there is a concept of time inasmuch as a particular algorithm will take so long to complete (complexity). The reason it doesnt talk about concurrency is because concurrency doesn't bring anything to the table in terms of deciding complexity or computability.
to be a little more blunt :) Talking about concurrency in the lambda calculus is like talking about concurrent math or paralelizing the concept of addition (not an implementation).
While we have a thorough curriculum on functional programming at CMU (and for one class I did write several compilers which took more complex languages and translated them to the lambda calculus and even more minimalistic languages like the SK (optionally I) combinator calculus, that class wasn't on compilers, it was "Principles of Programming Languages". It also covered type theory, implementing type inference, and so on.
Whereas our compilers class covers the sort of topics you would expect in a compiler targeting a real architecture: parsing/lexing, choosing intermediate languages, SSA form, optimizations, register allocation, code generation, and so on. We have a separate class which covers compiling higher order typed languages (SML in particular).
Our compilers class is also unusual (in ones I have seen) in that, instead of building a lexer, building a parser, doing translation, and so on for each stage, as separate projects, rather students build a whole compiler for each assignment. The language compiled gains more and more features: first control flow, then function calls, then memory operations (structs, arrays, heap-allocation).
Might I ask your thinking when choosing the lambda calculus as the basis for your compilers class?