[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: 01 Jun 2001 00:13:39 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Rob Browning <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
> > 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.  [...]
> Well, for at least SRFI-0, cond-expand is restricted to the top level,
> and is really described as being intended to indicate the presense or
> absence of features.

Yes.  And, it is not a natural thing for cond-_expand_ to cause code
to execute immediately, which it would have to do for the `compile'

Not much can be gained by combining the two.  I herewith retract that

> Well, with both cond-expand and psyntax's eval-when, non-top-level
> invocations are forbidden.  This seems like a wise restriction to
> start with, we can always relax it later if it seems necessary and
> the behavior can be clearly described.

Hmm, I feel that allowing eval-when in non-toplevel forms is important
since macros might expand into it.

> [Chez-Scheme's eval-when]
> Personally, I would have expected code coming from a .scm file vs
> code coming from an "object file" to be indistinguishable.

Yes, me too.  `eval' should probably be conceptually equivalent to
`compile' followed by `execute'; `load' is conceptually equivalent to
`eval'uating all forms one after the other.

reply via email to

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