[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EVAL-WHEN buried inside forms.



Please keep in mind that this message assumes I understand how EVAL-WHEN 
is supposed to work, which I might not.

I don't believe that the model for EVAL-WHEN takes into account uses at 
other than "top level".  For example:

(eval-when (compile load)
  (let (...)
    (eval-when (eval)
      ...stuff...)
    ...)
)

The LET will be EVALed at compile-time by virtue of the compile 
situation in the outer EVAL-WHEN.  Then, as the compiler begins to 
process the body of the LET, it will see the inner EVAL-WHEN and EVAL 
the stuff, then discard it.  Oops, the stuff was EVALed twice!

In order to deal with EVAL-WHEN forms anywhere, we need to improve the 
model.  But it's not clear to me what some combinations mean.

- Paul

------