[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiple-value-bind pervasive-ness ...
- To: email@example.com@RUTGERS.EDU
- Subject: multiple-value-bind pervasive-ness ...
- From: David Bein <pyrnj!pyramid!bein@RUTGERS.EDU>
- Date: Tue, 06 Oct 1987 03:23:00 -0000
I know this must have come up before ..
Is the scope of the declarations in a multiple-value-bind to
include to evaluation of the form which produces the multiple-values?
For example ...
(SETQ A :SPECIAL-A)
(DEFUN HACK (A)
(MULTIPLE-VALUE-BIND (A SECOND-VALUE)
(VALUES A 'DUMMY)
(DECLARE (SPECIAL A))
(LIST A SECOND-VALUE)))
Should (HACK :LEXICAL-A) return (:SPECIAL-A DUMMY) or (:LEXICAL-A DUMMY) ?
The reason for the second-value is to avoid what a compiler
might do as a rewrite to a let binding in which case the
answer is fairly clear. If the answer is that the declaration
does NOT apply to the evaluation of the value producing
form, then a rewrite into the most obvious let is of course illegal.