[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-when and eval-case issues.
From: |
Marius Vollmer |
Subject: |
Re: eval-when and eval-case issues. |
Date: |
31 May 2001 02:05:31 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102 |
Rob Browning <address@hidden> writes:
> Eval-case seems to only be used in boot-9. I'm presuming it's not
> really intended for general consumption and that eval-when is what
> we're planning to be the general mechanism. However, we can't just
> get rid of eval-case altogether, since eval-when doesn't really do the
> same thing.
Somehow, I like `eval-case' better since it is more expressive. Maybe
this added expressiveness doesn't make any sense, since I didn't
understand eval-when good enough when I introduced eval-case. I don't
understand it much better now, only that there is more to it than I
thought.
So I don't know what to do about this yet, and I'd rather not change
it.
What's more, `cond-expand' might be of interest as well, as a general
compile-time feature test device. Maybe it can absorb the eval-when
functionality. That is, when we can get by with `cond-expand' being
the only feature/situation test thing, I would go for it. `eval-when'
and maybe `eval-case' could be defined in terms of it, for
compatibility.
> With respect to eval-when, we have to decide what its syntax and
> semantics should be. The behavior of our existing version is
> documented here http://www.scheme.com/csug/system.html#g2256, and it
> supports the eval-when "situations" of compile, load, and eval.
> However, Marius mentioned that perhaps we should support a more
> common-lisp like eval-when. If so, then it supports
> :compile-toplevel, :load-toplevel, and :execute, and has a fairly
> complicated set of rules for how and when these keywords affect
> loading, compiling, etc.
I'm not sure whether I want the complicatedness of the CL eval-when,
(but I want at least understand why it is there). The syncase
eval-when specification seems quite simple to me after reading the CL
spec. This might be an advantage (it's easy to understand) or a
disadvantage (doesn't really do what is needed, for example when
eval-whens are nested within themselves, or within non-toplevel other
forms). I don't know yet.