From: Andy Wingo <wingo@pobox.com>
To: Noah Lavine <noah.b.lavine@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: The dynamic stack
Date: Wed, 07 Mar 2012 10:51:58 +0100 [thread overview]
Message-ID: <87fwdk20xt.fsf@pobox.com> (raw)
In-Reply-To: <CA+U71=Nsqs_BrBOkunpRcShtVCroJp3Vs3v7jELoSrjFKKB3eQ@mail.gmail.com> (Noah Lavine's message of "Wed, 7 Mar 2012 01:05:59 -0500")
Hi Noah,
On Wed 07 Mar 2012 07:05, Noah Lavine <noah.b.lavine@gmail.com> writes:
>>> The “dynwind stack” actually (I misread it the first time.)
>>
>> Yes, it did have this name before. (More often, "the wind list".) But
>> since "dynwind" is overloaded so much (dynamic-wind operator, <dynwind>,
>> scm_dynwind_*), and the dynamic stack can have other things on it like
>> prompts, I thought it best to give it a new name.
>
> I see your point about the old name, but I find the new name
> confusing. What about the stack that holds regular program variables
> and temporaries? That is also dynamic, so at first I thought you were
> referring to that. I didn't know what was going on until this email.
It's a good question!
The essential difference is that lookup on the VM stack is static --
things are always at known locations. That's what lexical scoping gives
us. Lookup on the dynamic stack is dynamic: e.g. "what's the nearest
prompt with tag FOO", "what are the dynamic-wind expressions within that
extent", etc.
In an ideal world, we'd probably use the same stack for both purposes,
as C++ does (AFAIU). The reason that we don't is that the scm_dynwind_*
API manipulates the dynwind stack from outside of the VM.
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2012-03-07 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 16:25 The dynamic stack Andy Wingo
2012-03-06 17:20 ` Ludovic Courtès
2012-03-06 20:32 ` Andy Wingo
2012-03-07 6:05 ` Noah Lavine
2012-03-07 9:51 ` Andy Wingo [this message]
2012-03-07 23:09 ` Ludovic Courtès
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=87fwdk20xt.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=noah.b.lavine@gmail.com \
/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).