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

Proposed evaluator for Common LISP -- declarations



Excuse me for one part of the last message; of course there's a
way to declare the type of a dynamic variable -- just put the
declaration at top-level (I don't know where my mind was at the
time).  However there still needs to be a way to ask the type of
a variable (dynamic or otherwise).  This is not the same as the
type of the value of the variable, of course.  This will be
useful for the evaluator as well as for debugging.

How about a special form called var-type, such that
	(let ((x 1))
	     (declare (type integer x))
	     (var-type x))
returns INTEGER.

Also, it's annoying that a common case will be

(declare (type integer foo)
	 (special foo))

Is there any support for a declaration that combines the above?

Also, I understand that Maclisp compatibility may be important
enough to warrent the hack whereby (declare (special x)) has
different semantics at top-level than when imbedded, but should
it's use be encouraged in new programs?  Perhaps there ought to
be (declare (super-special x)) for new programs?  Or perhaps
pervasive-special?  Unfortunately, it is a loss to make this name
that long.