> Hmm, read-macros seem indeed a lot misunderstood. NEVER use a
> read-macro to insert values which are defined at *run*time! As the
> name says, they are evaulated at *read* time!

Maybe I too have been misunderstanding all along.  Alex, you seem to
be inferring here a strict separation between readtime and runtime;
however, I see "eval process" as "intertwining" them.

So, are you saying that the following is a kind of "abuse" (since I am
"insert[ing] values which are defined at *run*time" with a *read*
macro) and that it gives me the answer I'm looking for is some kind of
happy coincidence (despite my misunderstanding of the eval model)? :)

  ? (let X (+ 3 4) (glue " " '("Number" `X `(- 4 9))))
  -> "Number 7 -5"

Or this, even?

  ? (let X (+ 3 4) (glue " " '("Number" `X `(- X 9))))
  -> "Number 7 -2"

It seems to me that *read*ing is inherently involved in *run*time (the
"eval process", which is recursive of course).

For instance, X in the above expressions is at some point, in the
"eval process", bound to 7 before the expression

  '("Number" `X `(- X 9))

is evaluated, and that the evaluation of this expression goes through
a reckoning of read macros first (under the "context" of the current
runtime environment which has X bound to 7).

If so, aren't then the `let` expression usages above *not*
problematic?

Or am I thinking about this incorrectly?  Thanks!
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to