antispam@fricas.org (Waldek Hebisch) writes:
And normally functions do not return, simply tail-call to passedContinuations are nontrivial precisely because of the non-tail-call
"continuation".
case, where the continuation is re-used. So you can use them to
implement coroutines, multitasking, etc. If they can't do that, they're
not "full" continuations. I don't see how to implement full
continuations using CL macros.
There is some sentiment[1] in the Scheme world that mandating full continuations in Scheme was a mistake and that it would have been
preferable to stop with "delimited" or "one-shot" continuations. Those
are maybe closer to catch/throw than to coroutines. I don't know if
those can be done with CL macros but it seems more plausible.
AFAIK it's impossible to implement support for `call/cc` via macros in
Common Lisp *if* you want the affected code to be able to transparently
call arbitrary "external" functions like (say) `mapcar`.
OTOH, you can definitely implement a Common Lisp macro that takes as
argument code written in a DSL which happens to be a language that looks exactly like Common Lisp except it includes a `call/cc` primitive
(and in which you can (re)implement `mapcar`).
There is some sentiment[1] in the Scheme world that mandating full
continuations in Scheme was a mistake and that it would have been
preferable to stop with "delimited" or "one-shot" continuations. Those
are maybe closer to catch/throw than to coroutines. I don't know if
those can be done with CL macros but it seems more plausible.
AFAIK they bump into the same problem as `call/cc` w.r.t implementing
them as macros.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 03:36:57 |
| Calls: | 1,194 |
| Files: | 1,353 |
| D/L today: |
2 files (1,590K bytes) |
| Messages: | 291,364 |