|
|
|
|
|
by fadmmatt
5901 days ago
|
|
When I taught advanced compilers last semester, one of the projects was a Scheme-to-C compiler that implemented first-class continuations via call/cc. I realized when going over that material, however, that most students didn't know what a continuation was, or how to use them, so I created a "by-example" tutorial: http://matt.might.net/articles/programming-with-continuation... It covers exceptions, backtracking-search, the magic "amb" function, magic sat-solving, generators and cooperative threads. |
|
I am curious about your assertion that "with macros, it is not difficult to simulate preemptive multithreading". How would one go about doing this safely?
(The font changes partway through, btw. Maybe you forgot to close a tag?)