unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* let-values, and-let* no variables
@ 2004-08-20  1:27 Kevin Ryde
  2004-08-20 10:28 ` Marius Vollmer
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2004-08-20  1:27 UTC (permalink / raw)


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*".


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-21 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-20  1:27 let-values, and-let* no variables Kevin Ryde
2004-08-20 10:28 ` Marius Vollmer
2004-09-07  0:12   ` Kevin Ryde
2004-09-21 22:09     ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).