[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delimited continuations
From: |
Michael Heerdegen |
Subject: |
Re: Delimited continuations |
Date: |
Tue, 12 Dec 2017 15:17:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> Things get more interesting with side-effects:
>
> (defvar fwdc nil)
> (reset (λ (p)
> (if fwdl 3
> (setq fwdc t)
> (shift p (λ (k) (k 5))))))
>
> since we end up re-computing the `if` test and hence not using the `5`
> provided to `k`. I think this case is a clear "bug" (because, IIUC,
> (shift _ (λ (k) (k v))) should be equivalent to just `v`).
Or we just don't call it continuation, which is misleading given the
suggested implementation which gives you more something like a delimited
re-execution.
Anyway, my personal opinion is to make such stuff available so that
people can experiment with it.
Michael.