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

Re: Constant Functions

The approach we have taken at Symbolics is that all function references
are assumed to be "constant" unless they are declared (or proclaimed) to
be NOTINLINE.  The idea is that failing to indirect through the function
cell is a minor form of inlining.  This has several advantages:

The "constant" case is by far the most common in normal code.  Avoiding
a user declaration here is very important.

We use an existing declaration which already has the desired meaning.
Declaring a function NOTINLINE is the standard way to make it traceable
and (as we see it) replaceable.

The environment does not have to carry this too far.  Our environment
supports redefinition at the user level (compiling a new definition
from the editor) even when it doesn't at the code level