guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eval


From: Marius Vollmer
Subject: Re: eval
Date: 07 Feb 2001 17:18:08 +0100
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Dirk Herrmann <address@hidden> writes:

> BTW, my statement that there is no way to determine the evaluator's top
> level environment is wrong.  You can do it as follows:
> 
> (define foo
>   (let* ((tle (current-module)))
>     (lambda ()
>        (display "My top-level environment is: ")
>        (display tle) (newline)
>        (display "The current module is: ")
>        (display (current-module)) (newline))))

Yes, I use to it like this

    (define this-module (current-module))

    (define (foo)
      (display "foo's module is: ")
      (display this-module) (newline)
      (display "The current module is: ")
      (display (current-module)) (newline))

> I have changed my mind on this issue.  Yes, eval should be a
> 'save-module-excursion'.  However, there is only one point left that I am
> not happy with:  The name eval-in-current-module.  I think we should try
> to find some different name here.  eval-in-current-module sounds as if it
> just means (eval expr (current-module)), but there is more to it, since it
> does not do a 'save-module-excursion'.

Yes, agreed, eval-in-current-module is not the best name.

> eval*
>   This one avoids the naming problem at all.

Hmm, what about simply `primitive-eval', to go with `primitive-load',
etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]