This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: In Order of Importance?
Feed Title: Avi Bryant
Feed URL: http://smallthought.com/avi/?feed=rss2
Feed Description: HREF Considered Harmful
The inimitable David Heinemeier Hansson points out that in a recent set of slides by Sam Ruby, Rails is the fourth item from the top on a list of things Worth Watching. What's item number three? Continuations.
Sam also brings us Continuations for Curmudgeons, an explanation of call/cc from the point of view of a C programmer. I've also often found that explaining continuations in terms of the possible machine (or virtual machine) implementation often gets the point across much easier than trying to explain the semantics. How do you capture a continuation? You save a copy of the current execution stack. How do you invoke it? You blow away the current stack and replace it with a fresh copy of the one you saved. How many times can you do this? As many as you like.
Just don't explain it that way around Scheme folk...