From: David Kastrup <dak@gnu.org>
To: guile-devel@gnu.org
Subject: Re: Non-stack-copying call-with-current-continuation?
Date: Sun, 04 Mar 2012 13:01:05 +0100 [thread overview]
Message-ID: <87wr7060e6.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87eht9bmno.fsf@pobox.com
Andy Wingo <wingo@pobox.com> writes:
> On Fri 02 Mar 2012 02:35, David Kastrup <dak@gnu.org> writes:
>
>> Sure, but things like gensym and make-prompt-tag (and (list '()) for
>> creating an eq?-unique object) are artificial hygiene coming at a cost
>> in symbol table and symbol generation time rather than "lexical"
>> hygiene.
>
> "Hygiene" is not right the word here. "Hygiene" applies lexically --
> statically. You want a continuation that only works within a certain
> dynamic extent -- that's dynamic. Unique objects are well-suited to the
> needs of dynamic problems.
The problem is not a unique object (you get one with every (list 0)
call), the problem is a unique symbol. Of course an escape continuation
works only in a dynamic context. But that does not mean that its
identity needs to be represented by a globally persisting symbol. The
global symbol space is a different identity space than heap equality,
and it never gets garbage collected: the lifetime of a gensym is
eternal.
> But really, your concerns are entirely misplaced. Choose clean,
> clear, optimizable abstractions. Call/ec is a good example. If you
> need to implement it, do so using whatever tools are at hand. If you
> can't implement it or it's slow, then bring these concerns forward.
> But to dismiss Noah's suggestions out of hand is inappropriate at this
> time.
I am not dismissing his suggestions. I am saying that I find call/ec a
nicer primitive than catch/throw exactly because it does not need a name
or symbol to work but has its identity and life-time coupled to an
object rather than a symbol.
And frankly: the manual talks about prompts being composable and gives
an example which seems utterly wrong to me since it does not actually
abort a computation but rather half-finishes it. It is unclear what
part of the computation will finish and what will complete.
--
David Kastrup
next prev parent reply other threads:[~2012-03-04 12:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 0:00 Non-stack-copying call-with-current-continuation? David Kastrup
2012-03-02 0:20 ` Noah Lavine
2012-03-02 0:42 ` David Kastrup
2012-03-02 1:01 ` Noah Lavine
2012-03-02 1:35 ` David Kastrup
2012-03-02 1:49 ` Noah Lavine
2012-03-02 8:36 ` David Kastrup
2012-03-03 5:03 ` Andreas Rottmann
2012-03-03 5:04 ` Andreas Rottmann
2012-03-03 17:48 ` Andy Wingo
2012-03-04 12:01 ` David Kastrup [this message]
2012-03-04 12:15 ` Andy Wingo
2012-03-04 13:59 ` David Kastrup
2012-03-04 18:42 ` Andy Wingo
2012-03-04 18:45 ` Mark H Weaver
2012-03-04 23:13 ` David Kastrup
2012-03-05 0:35 ` Mark H Weaver
2012-03-05 1:44 ` David Kastrup
2012-03-02 1:18 ` Nala Ginrut
2012-03-02 1:25 ` Noah Lavine
2012-03-03 17:41 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wr7060e6.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).