unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: David Kastrup <dak@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: A plea for local-eval in 2.0.4
Date: Sat, 14 Jan 2012 16:04:23 +0100	[thread overview]
Message-ID: <87y5tauxzc.fsf@pobox.com> (raw)
In-Reply-To: <87r4z264nf.fsf@fencepost.gnu.org> (David Kastrup's message of "Sat, 14 Jan 2012 09:59:32 +0100")

On Sat 14 Jan 2012 09:59, David Kastrup <dak@gnu.org> writes:

> In Guilev1, the module is probably recorded as part of the
> procedure-environment.  In Guilev2, a variable reference is compiled?
> How does that work when there is no such variable?  It gets created
> with an undefined binding?

Guile 2.0.x records the module that was current when the procedure was
created, if it is necessary to resolve toplevel bindings.

> within local-eval, what is the return value of calling
> (current-module)?  I would expect that it is the same as outside of
> local-eval

Yes.

> so that (define x 5) inside of local-eval would _not_ be equivalent to
> (module-define! (current-module) 'x 5) as the first one would take the
> current module at the-environment time, and the second one would take
> it at local-eval time.

This would be a lexical definition, and probably not allowed by the
current code.

Regards,

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2012-01-14 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 21:43 A plea for local-eval in 2.0.4 Mark H Weaver
2012-01-12 23:02 ` Bruce Korb
2012-01-13  9:20 ` David Kastrup
2012-01-13 16:21   ` Mark H Weaver
2012-01-13 18:50     ` David Kastrup
2012-01-14  1:07       ` Mark H Weaver
2012-01-14  8:59         ` David Kastrup
2012-01-14 15:04           ` Andy Wingo [this message]
2012-01-14 15:16             ` David Kastrup
2012-01-14 15:33               ` Andy Wingo
2012-01-14 16:17           ` Mark H Weaver
2012-01-14 17:20             ` David Kastrup
2012-01-14 17:59             ` Mark H Weaver
2012-01-14 18:04               ` David Kastrup
2012-01-14 18:35                 ` David Kastrup
2012-01-14 19:04                 ` Mark H Weaver
2012-01-14 15:24 ` 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=87y5tauxzc.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=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).