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

Re: Quick query about CONSTANTP

In response to the message sent  10 November 1982 0006-EST (Wednesday) from Guy.Steele@CMU-10A

Interlisp-D has the (currently undocumented, but "upcoming")
function CONSTANTEXPRESSIONP; it works not only for symbols,
but for other forms such as (QUOTE FOO) and (CONSTANT (LIST 1 2))
-- the latter being somewhat like '#.(LIST 1 2) except that the
evaluation is performed at eval/compile time rather than readtime.
Ultimately CONSTANTEXPRESSIONP should even work of forms like
(COND ((EQ PI PI) 3) (T 4)), but its current status is more limited.

Just exactly how CONSTANTP, or CONSTANTEXPRESSIONP if you care to
follow the Interlisp pattern, is implemented for symbols is
probably not all that important.  But your suggestion of a bit
in the symbol header brings back memories of LISP1.5 which
had certain property names treated specially by the equivalent
of PUTPROP -- namely a word of bits that could be turned on
or off.  If efficiency is important in matters like these
(i.e., system properties whose values are always true or false),
them maybe it's not such a bad idea to have these  property
bits again.  But that's *if* ...