Advanced Scheme Techniques (2004) [pdf]

67 mooreds 6 9/12/2025, 3:44:52 PM people.csail.mit.edu ↗

Comments (6)

s20n · 1h ago
Speaking from personal experience, Scheme looks deceptively simple but it is one of the hardest languages to write a compiler for.

I say this mainly because of 2 things:

1. Hygienic Macros (You practically have a whole another language inside the language)

2. First Class Continuations (There is no good way to achieve this other than doing a CPS transform on the AST)

bjoli · 6m ago
CPS transformation is a good thing to do anyway, no? Then CPS your CPS and you have delimited continuations.
maplant · 1h ago
CPS transforms are not the only way; if you translate the scheme to bytecode for a virtual machine, the call stack and IP can be reified.

But yes, for a compiler specifically, you need a CPS transformation

bjoli · 7m ago
You should all have a look at Oleg Kiselyov's speech about continuations at Dan Friedman's 60th birthday. That is some next level shit.
shawn_w · 29m ago
Bug: The `list-iter` function presented assumes that an empty list is false. While that's the case in Common Lisp, it isn't in Scheme (and hasn't been in a very long time; iirc in early versions it was optional behavior).
twoodfin · 56m ago
This is part two of a seminar series:

https://people.csail.mit.edu//jhbrown/scheme/