[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval
From: |
Marius Vollmer |
Subject: |
Re: eval |
Date: |
04 Feb 2001 19:03:49 +0100 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
Dirk Herrmann <address@hidden> writes:
> SOLUTION:
> ---------
>
> Instead of having only one global variable 'the-module', we have
> 'the-module' and 'the-interaction-module'. [...]
I find this and what has been discussed in the sequel needlessly
complicated. What is wrong with this:
Conceptually, we should probably isolate the current-module from
eval. We should have `with-current-module' and
`eval-in-current-module' [I like long names], and `eval' would be
(define (eval exp env)
(with-current-module env
(eval-in-current-module exp)))
The repl would use `eval-in-current-module'.
The only question that is left, as I see it, is whether to
overload the name `eval' with both a two-argument and a one
argument version, or we should have two distince names. I can
live with either solution.
Because Dirk has expressed reservations about overloading one
name, I suggest to have two names:
eval
- this is R5RS eval and does what eval does now.
eval-in-current-module
- this is our previous eval which didn't switch the
`current-module'
We should probably also have these definitions
(define (call-with-current-module mod proc)
(save-module-excursion
(lambda ()
(set-current-module mod)
(proc))))
(define-macro (with-current-module mod . body)
`(call-with-current-module ,mod (lambda () ,@body)))
- Re: eval, (continued)
- Re: eval, Dirk Herrmann, 2001/02/04
- Re: eval, Neil Jerram, 2001/02/05
- Re: eval, Dirk Herrmann, 2001/02/06
- Re: eval, Martin Grabmueller, 2001/02/06
- New module system and VM, Keisuke Nishida, 2001/02/06
- Re: eval, thi, 2001/02/17
- Re: eval, Keisuke Nishida, 2001/02/06
Re: eval,
Marius Vollmer <=
- Re: eval, Dirk Herrmann, 2001/02/04
- Re: eval, Marius Vollmer, 2001/02/04
- Re: eval, Dirk Herrmann, 2001/02/05
- Re: eval, Marius Vollmer, 2001/02/06
- Re: eval, Dirk Herrmann, 2001/02/07
- Re: eval, Marius Vollmer, 2001/02/07
- Re: eval, Dirk Herrmann, 2001/02/07
- Re: eval, Neil Jerram, 2001/02/07
- Re: eval, Dirk Herrmann, 2001/02/09
- Re: eval, Neil Jerram, 2001/02/09