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

Re: Issue: LOAD-TIME-EVAL (Version 8)



    Date: Wed, 25 Jan 89  13:26:18 CST
    From: David N Gray <Gray@DSG.csc.ti.com>

    ...
    > > Alternatively, you might abandon the intuition and think about the 
    > > consequences of just using EQ of the LOAD-TIME-VALUE expression.  Would
    > > it be so bad?
    > 
    > That's pretty much the alternative I mentioned above, I guess.

    This looks like the only viable answer to me.

I can't parse the original sentence [by Moon?] above, so I can't know whether
to agree or disagree. Which intuition are we talking about abandoning:

 Intuition #1: (DOTIMES (I 5) (PRINT (LOAD-TIME-VALUE (F))))
               evaluates the LOAD-TIME-VALUE expression only once.

 Intuition #2: (DOTIMES (I 5) (PRINT (EVAL '(LOAD-TIME-VALUE (F)))))
               evaluates the LOAD-TIME-VALUE expression at least 5 times.

I'm reluctant to abandon intuition #2 because I fear that it will complicate
debugging tremendously. eg, if the dynamic state changes [eg, due to a bug
fix] such that (F) can return a new value but it keeps returning an old value
due to some hidden cache, I think the effects would be very frustrating.

I'm willing to relax intuition #1 because I can see that some interpreters
would have too hard a time dealing with it. Nevertheless, I'd like to have
an implementation hint suggesting that the intuition be supported where
feasible.

Given that intuition #1 is relaxed, I don't see the difficulty in supporting
intuition #2.