unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <marius.vollmer@uni-dortmund.de>
Cc: bug-guile@gnu.org
Subject: Re: Strange undefined binding bug coupled to module system
Date: Wed, 15 Dec 2004 18:29:08 +0100	[thread overview]
Message-ID: <lj8y7zpj17.fsf@troy.dt.e-technik.uni-dortmund.de> (raw)
In-Reply-To: <xy7y8hadr3q.fsf@nada.kth.se> (Mikael Djurfeldt's message of "10 Nov 2004 09:51:21 +0100")

Mikael Djurfeldt <djurfeldt@nada.kth.se> writes:

> Marius Vollmer <marius.vollmer@uni-dortmund.de> writes:
>
>> Mikael Djurfeldt <djurfeldt@nada.kth.se> writes:
>> 
>> > 2004-04-22  Dirk Herrmann  <dirk@dirk-herrmanns-seiten.de>
>> >
>> > 	(scm_m_define): Change order to first create binding and
>> > 	evaluating the expression afterwards.
>> >
>> > While this change works in the R5RS situation without a module system,
>> > the presence of a module system, with the difference between imported
>> > and local bindings, introduces complications.
>> 
>> What would happen if you just revert that change?
>
> The change is a bugfix for another bug, so reverting it would swap one
> bug for another.

Ahh, I see.  I'd say a good behavior for 'define' then is the following:

 - When the defined name has a local binding, use that binding.

 - When the defined name has an imported binding, look up the value of
   that binding and make a new local binding initialized with that
   value.

 - When the defined name has no binding, make a new one and initialize
   it with #<unspecified>.

Then the expression is evaluated and the new (or old local) binding
from above is set to the resulting value.

Ok?


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


  reply	other threads:[~2004-12-15 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 13:12 Strange undefined binding bug coupled to module system Mikael Djurfeldt
2004-10-24 18:55 ` Mikael Djurfeldt
2004-11-04 14:10   ` Marius Vollmer
2004-11-10  8:51     ` Mikael Djurfeldt
2004-12-15 17:29       ` Marius Vollmer [this message]
2004-12-15 19:16         ` Mikael Djurfeldt
2004-12-22 15:35           ` Marius Vollmer
2004-12-22 20:29             ` Mikael Djurfeldt

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=lj8y7zpj17.fsf@troy.dt.e-technik.uni-dortmund.de \
    --to=marius.vollmer@uni-dortmund.de \
    --cc=bug-guile@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).