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

Re: side effects and a complr bug.

I think it is poor practice to have macros/special forms which have
unpredictable results with respect to side effects, order of evaluation,
and repeated evaluation.  Having to assume that it is unsafe to have
any sigificant evaluation inside of SETF or any of its derivatives
significantly screws the power normally provided by Lisp.  The obvious
convention to follow is that things get evaluated exactly once, and
in left to right order.  It is possible to design a relatively simple
protocol for making SETF constructs, which can then be used to define
things like PUSH and POP, complete with typing and common subexpression
optimization.  To make it easier to define these constructs, they can
just bind whatever they think is necessary, and that can be optimized
away later.  Much of the support necessary to do this exists already,
and i have been employing a lambda-optimizer for other purposes for
some time now.