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


I think it would be fine to change Lisp machine DEFSUBST
to avoid evaluating agrs twice or in the wrong order,
as long as the simple cases which are used now remain efficient.
I don't expect that this would require a terrible
slowdown since usually the args are such that it is easy to tell
that it is ok to do the direct substitution.

Fortunately, this doesn't require a compiler which has
any hair about LAMBDA.  That probably would be a big loss
and is almost certainly out of the question.

I don't know why KMP talks about DEFSUBST as if the definition
of DEFSUBST included a guarantee that it will evaluate arguments
twice or in the wrong order.  I never intended that to be part
of its contract.  DEFSUBST is that which defines an open-codable
function. The rest is a matter of how it is implemented.

There must be a distinct defining form for open codable functions.
It would be intolerable for the compiler to open code
any function unless the user gives permission.  It is welcome
to refrain from open coding a function for some reason, but it has
no right to take the initiative to do it.  It would screw users
several ways:
 It woull be consufing in debugging
 It would prevent tracing
 It would prevent redefinition of the function from working
The problems would be reduced if there were a data base which
records which compiled functions depend on each open coded function
(this would be useful in any case, so it's a good idea).
But even wit this feature, it is a bad idea to open-code
anything tha the user doesn't expect.