[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
let-values, and-let* no variables
From: |
Kevin Ryde |
Subject: |
let-values, and-let* no variables |
Date: |
Fri, 20 Aug 2004 11:27:37 +1000 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
I'm contemplating the way "begin" is used for the body of let-values
and and-let* with no bindings. It has the unhappy effect of allowing
what is visually an internal define to go out into the containing
environment, eg.
(use-modules (srfi srfi-11))
(let-values ()
(define x 123)
456)
(display x)
;; prints 123
The reference implementation of srfi-11 seems pretty clear that
"begin" is intended for let-values, and the formal semantics part of
srfi-2 suggests the same for and-let*. Dunno if that's only an
oversight regarding begin versus internal defines though.
I guess nobody would write an empty and-let* or let-values
deliberately, but it could arise out of a macro. I'm thinking to put
some words of caution in the manual, to make it clear the body isn't
the same as a plain "let" or "let*".
- let-values, and-let* no variables,
Kevin Ryde <=