Martin Buchholz <martin(a)xemacs.org> writes:
I actually go further and claim that call/cc is too difficult even
for
your run-of-the-mill XEmacs implementer, like me, to understand.
Maybe I'm in need of some 180 degree neck-twisting.
I think that the reason why everyone is having so much trouble
understanding call/cc is that they're trying to do so without first
understanding the basic concept of continuations.
When I first started looking at Scheme code that used call/cc, I was
baffled. I was totally unable to wrap my brain around it.
Then, I read the chapter on continuations in _Essentials of
Programming Languages_ (Wand, et al) two or three times. Once I
understood continuations in the general sense, call/cc was no big
deal.
To show how much of a difference this makes: I used this approach in
a class that I taught. At the outset, I had ten people who were
familiar with the basics of Scheme, but none of them were very
proficient. Two hours later, they all undertsood the wonders of
continuation passing.
I attribute most of this to the fact that I didn't even mention
call/cc for at least an hour. :-)
--
Justin Sheehy
In a cloud bones of steel.