[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-case and toplevel prohibitions
From: |
Ludovic Courtès |
Subject: |
Re: eval-case and toplevel prohibitions |
Date: |
Wed, 04 Mar 2009 09:48:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) |
Hello!
Andy Wingo <address@hidden> writes:
> So I was thinking: why do we have this fetish for prohibiting certain
> forms in a non-toplevel context? I am of a mind to replace eval-case
> with eval-when, which is actually more expressive, as it allows us to
> discriminate the different phases in non-toplevel contexts as well.
Could it be because `eval-case' expressions can evaluate to nothing,
which can be confusing in non-top-level contexts, e.g.,
(define (nothing)
(let ((foo (eval-case ((never-true) 'foo))))
foo))
Actually, this yields #<unspecified> in Guile-VM and #f in `master'.
The definition of `toplevel-env?' in there in quite sloppy...
Thanks,
Ludo'.