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

LAMBDA proposals and counter-proposals



I don't like the suggestion that declarations in LAMBDA lists are
unnecessary because of LOCAL-DECLARE and DECLARE.  First of all,
the semantics are different.  Consider
	(LAMBDA (A (SPECIAL B))
	  ...
	  (LAMBDA (B) ...)
	  ...)
and
	(LOCAL-DECLARE ((SPECIAL B))
	  (LAMBDA (A B)
	    ...
	    (LAMBDA (B) ...)
	    ...))
I would expect the second B to be unspecial in the first example, and special
in the second, and I prefer the semantics of the first.  Also, LOCAL-DECLARE
is less readable (the LISPM manual even recomends that DECLARE be used
instead of LOCAL-DECLARE as a result).  The problem with DECLARE
is that it loses when you want to use it with macros that
generate lambdas.  E.g. suppose I want to define a LET!, then I
have to have it specially check for leading DECLARE forms and put
them directly after the LAMBDA instead of with the rest of the
body.