[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some easy ones (?)
There are currently several declaration proposals. The following two
forms are equivalent under all those with pervasive declarations.
(let ((a (make-a)))
<declaration for a>
(let ((a (refine-a a)))
<body>))
(let* ((a (make-a))
(a (refine-a a)))
<declaration for a>
<body>)
I believe that shadowing within let* is no more misunderstandable than
shadowing in general. Almost everyone uses the same name in separate
functions for objects of a given class. Does that confuse anyone?
Pervasive declarations are attractive because most of us use the same
convention locally. Repeated names in let* are merely one instance of
this.
CL has thus far avoided most prescriptive style issues. (I find it
strange that Fahlman prefers setq to let. :-)) I have no objection to
a note in the manual suggesting that some people think it's bad style
to repeat names in let*, much like it suggests that special variables
should be surrounded by *'s. If we are opening up prescriptive style,
I'm sure Falhman, Gall and I agree that the latter is a more important
issue. (If special variables have to be *starred*, special
declarations and all of the associated confusion goes away.)
-andy
-------