>>110
I never said you should use them instead of
set!, but instead of
call/cc+
set!.
The mutable state considered harmful part was more a joke than serious, what's bad about
call/cc+
set! are the excessive calls to
call/cc, which is a costly operation in most non-CPS implementations.
Are two (or more) full stack copies less expensive than a single, partial stack copy?
You can get some comparisons and timings here:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.11.3425
I would also like to argue whether delimited continuations, when used to hack around mutable state, make the code more readable.
Well, I still have to see something more complicated than a non-local return or amb written using
call/cc that doesn't look like absolute spaghetti code. Most applications of delimited continuations I've seen were pretty straightforward.
I don't have any example of how awesome delimited continuations can be at the moment, mostly because I lack imagination. Maybe lexers/parsers?