[plt-scheme] eval define
On Thu, May 21, 2009 at 8:59 PM, Jon Stenerson <jonstenerson at comcast.net> wrote:
> So my question is: in r6rs how do you arrange for runtime decisions about
> definitions (on the basis of the content of a data file for instance)?
I don't know about R6RS, as I don't use it. However, if this is really
your use case, it doesn't make sense. Let's say you're going to define
x in some cases and y in others. How are you then going to write code
that conditionally uses one of these definitions? You can't. I.e. you
can't write
(if-defined x
(do-something x)
(do-something y))
Doing this:
(define x (eval some-expr))
is a better way to go.
HTH,
N.