[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Constant-Function, and integration-level
Clearly any decent development environment should not 'lock in' functions
during development. But that's not a question that a language standard need
address, it's something between you and your Lisp vendor...
The language issue is, when you've finished developing your program, using
whatever tools your implementation provides for that purpose, what properties
must that program have in order to be a correct Common Lisp program and hence
work in any other correct Common Lisp implementation. In this particular case,
the question is, can your program assume that redefining a DEFUN'ed function at
runtime will affect all calls to that function:
(1) Yes, unless it's been declared CONSTANT-FUNCTION
or (2) No, unless it's been declared NOTINLINE
I'm arguing that (2) is more useful. With (1), all portable programs which
wish to take advantage of implementations which might do significant
optimizations on constant functions would have to be accompanied by huge
sets of constant-function proclamations (yes, i know this can be a program
that you have to run before compiling, which maps through all symbols. It's
still awkward).