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

More (unrelated) EVALHOOK issues



While I'm thinking about it (something I should have brought up ages ago,
but it might as well at least be on the books)...

There's a problem with EVALHOOK in that it really wants to pass a locative
to the piece of code that's being EVAL'd. Consider the problem of a
display-oriented stepper, trying to evaluate:

	(LAMBDA (X) (+ X X))

when EVALHOOK traps on evaluating X, how can you know which X you are
evaluating so as to highlight it. If you think it's fair to assume that
the lexically first X is the one that leads you there, consider:

	(LAMBDA (X Y) (COND ((FOO) X) (T (+ X Y))))

It would have been nice if we had made it so the form passed in was a
list whose CAR was the form to be evaluated rather than the form itself.
That way, in the first example above, EVALHOOK could see

	(X X)

and in the second, (X). Or perhaps that could be passed in as an extra
arg, being NIL when there was no locative available. 

This shortcoming in the info provided by EVALHOOK has come up in 
several stepper projects at MIT, and I should have mentioned it before,
but it should be thought about when time for revisions comes along.
-kmp