Skip to content(if available)orjump to list(if available)

Advanced Scheme Techniques (2004) [pdf]

Advanced Scheme Techniques (2004) [pdf]

6 comments

·September 12, 2025

s20n

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

CPS transformation is a good thing to do anyway, no? Then CPS your CPS and you have delimited continuations.

maplant

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

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

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

This is part two of a seminar series:

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