[Openmcl-devel] Where is the source of LET* macro

Tim Bradshaw tfb at tfeb.org
Fri Apr 14 14:01:10 PDT 2023


I think this is surprisingly underspecified.  I think the only sane answer is that declarations should apply to all the bindings of a given name in a given let* (or other sequential-binding) form.

It is possible to check this :

(let (c)
  (let ((x 1)
        (x (progn (setf c (lambda () x)) 2))
    (declare (special x))
    (values c (lambda () x))))

(sorry for paren/indentation errors, I'm typing this on a phone).  If the special declaration applies to both bindings then calling either function returned will be an error.  If it applies to only one: which, and why, and why does nothing say?  Either the spec simply omits this crucial information which would be a horrible omission, or the declarations apply to all the bindings.  Or, quite possibly I've just missed the place where it *does* say...

--tim

> On 14 Apr 2023, at 21:17, Arthur Cater <arthur.cater at ucd.ie> wrote:
> 
> I can only find a define-compiler-macro, I want to see how LET* handle declarations.
> It surprises me that it is apparently legal to say
> 
> ? (let* ((it 7) (it (list it it)) (it (length it))) it)
> 2
> ? 
> 
> and I wondered how declarations (if present) are treated - but I can’t find the source code.
> 
> TIA for any hep


More information about the Openmcl-devel mailing list