unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <marius.vollmer@uni-dortmund.de>
Cc: guile-user@gnu.org
Subject: Re: Refactoring dynamic roots
Date: Wed, 02 Feb 2005 14:55:30 +0100	[thread overview]
Message-ID: <ljhdkv12y5.fsf@troy.dt.e-technik.uni-dortmund.de> (raw)
In-Reply-To: <877jlralst.fsf@zip.com.au> (Kevin Ryde's message of "Wed, 02 Feb 2005 10:43:30 +1100")

Kevin Ryde <user42@zip.com.au> writes:

> Marius Vollmer <mvo@zagadka.de> writes:
>>
>> you want to give it its own dynamic state because that is very
>> useful.
>
> Do you have an example in mind?

Hmm, maybe running a repl: the code managing the repl and the cde that
is actually evaluated in it might each want to have their own dynamic
state.  For example, the current module of the evaluated code will
likely be different from the current module of the code that manages
the repl.

The behavior of eval would become more clean, in general.  For
example

  (eval '(define-module (foo)) (current-module))

will temporarily set the current module to (foo) as a side effect of
define-module, but eval will revert it to the module that was current
when eval was called.  If you want the current module change to stick,
you would have to use primitive-eval.

In contrast, you could use a dynamic state to carry 'dynamic state
information' from one call to eval to the next but while still being
isolated from changes to this state.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


      reply	other threads:[~2005-02-02 13:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-24 20:55 Refactoring dynamic roots Marius Vollmer
2005-01-25 10:03 ` Andy Wingo
2005-01-28 21:03   ` Kevin Ryde
2005-01-29  0:13     ` Marius Vollmer
2005-01-29 17:10       ` Neil Jerram
2005-02-01 16:20         ` Marius Vollmer
2005-02-02  5:56           ` Neil Jerram
2005-02-01 16:23   ` Marius Vollmer
2005-01-28 21:04 ` Kevin Ryde
2005-01-29  0:17   ` Marius Vollmer
2005-02-01 23:43     ` Kevin Ryde
2005-02-02 13:55       ` Marius Vollmer [this message]

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