Two possible approaches to self-hosting. 1) depth-first: write and debug each phase of the compiler completely. 2) breadth-first: write a simple version of the entire compiler (e.g., just the lambda calculus), add in the features one by one. I've started on #1, but it's a little tedious and I worry about finding 'design bombs' too far down the line and having to redo everything. Might make more sense to do #2 (which is how the original compiler was written!) in order to find any glaring issues earlier. Theoretically no big issues will show up, since we are merely translating from one language to the other. However, I've already run into some data structure difficulties. Also, #2 is more fun, more motivating, because you have something working quicker. For example, I'm currently working on the transform phase. I have macros working, but I haven't yet attacked pattern matching. Should I leave pattern matching out for now? Why not? [by that argument, I should probably have left macros out as well...] ----------------- TODO: define a datatype for all the various kinds of errors