[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Macros -> declarations
There are two alternatives for dealing with specials, both of which
remove SPECIAL from DECLARE. One is lexographic, relying on the
characters of the symbol. (Examples include inferring specialness from
*var* or $var, or, the Fortan II approach: special variables all begin
with the letters P, Q or S :-).
Another is syntactic; still allow arbitrary variables to be special, but
denote them in a way that removes the declaration from the (optional)
DECLARE syntax. For example, one might allow, at the "top level", a
(SPECIAL var1 var2 .... varn)
and also, in any place where a variable is bound (LET, DO, lambda lists,
etc.), allow (SPECIAL var) wherever var is allowed.
(This leads to a bit of a burden if you want a
special-optional-variable, because you have to say something like
(lambda (a b &optional ((special c))) --)
- - - - - - - - - - - - - -
I will attempt to step gently around the sticky issue of how "Common
Lisp" should balance implementation inertia against technical advances,
and restrict myself to comments about the form of inertia.
There are two kinds of inertia: implementations of "Common Lisp" and
programs implemented in it. It would seem that there is some confusion
among the implementations on whether macros are or are not allowed to
expand into declarations. I would claim that, at least the syntactic
example above represents no more turmoil to the typical compiler and
interpreter than either adding or removing the requirement that macros
can or cannot expand into DECLAREs.
Inertial of existing programs is a little harder to rate; it would also
seem reasonable for those with large quantities of MacLisp code such as
Macsyma might want to run in an (improper) superset which allows
It would help,