From: Andy Wingo <wingo@pobox.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Re: syntax-locally-bound-identifiers, local-eval
Date: Thu, 26 Jan 2012 00:44:57 +0100 [thread overview]
Message-ID: <87r4yn9wjq.fsf@pobox.com> (raw)
In-Reply-To: <87lioypom4.fsf@pobox.com> (Andy Wingo's message of "Mon, 23 Jan 2012 13:52:51 +0100")
Hi,
I'd like to clarify one point here.
On Mon 23 Jan 2012 13:52, Andy Wingo <wingo@pobox.com> writes:
> If we want to change the format of <lexical-environment>, we have two
> more compelling options. One would be to make a compatible change,
> but that's not always possible.
An example of a compatible change would be adding a field to the record.
The embedded make-struct calls from the expansion would result in a
record with the new number of fields, but with #f for the new fields.
This is actually a quite powerful capability. For example if we wanted
to add a field to list the names of the bound identifiers, for the
record printer, we could. If at some point we decided that was a bad
idea, we change the record printer, and ignore those new fields.
That's the other thing: we are free to change the runtime, within the
local-eval module, to do what we like. You won't ever get an old
runtime with a new expansion, so the problem is easier than it would
otherwise be. The suggested approach of using an all-in-one wrapper
procedure still has the runtime compatibility problem, but it's just as
tricky (if not more) to manage, because you have to remember what free
identifiers the expanded procedures could have referenced.
> The second would be to define another <lexical-environment-2> or
> something; new expansions of `the-environment' would embed references
> to this new vtable. Record type predicates could distinguish them for
> the purposes of local-eval/local-compile.
The patches that I attached to this message use an abstraction to deal
with the "env" that is passed to local-eval / local-compile being a
module or a <lexical-environment>. In the unlikely case that a
<lexical-environment-2> is needed, it would be trivial to extend this
with a third case. But there are a number of compatible changes to go
through before reaching this state.
In summary, I think we have the compatibility needs covered here
adequately. I don't look expect radical changes in this area, but even
if they do make sense (quite possible), I don't see the drawbacks of
this approach.
Regards,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2012-01-25 23:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 12:33 syntax-locally-bound-identifiers, local-eval Andy Wingo
2012-01-20 12:42 ` Andy Wingo
2012-01-20 19:04 ` Mark H Weaver
2012-01-20 20:00 ` Mark H Weaver
2012-01-22 7:01 ` Mark H Weaver
2012-01-23 12:52 ` Andy Wingo
2012-01-25 23:44 ` Andy Wingo [this message]
2012-01-22 0:28 ` 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=87r4yn9wjq.fsf@pobox.com \
--to=wingo@pobox.com \
--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).