[bitc-dev] Capture problem with by-ref
Jonathan S. Shapiro
shap at eros-os.com
Tue Mar 11 21:11:52 EDT 2008
On Tue, 2008-03-11 at 14:42 -0400, Swaroop Sridhar wrote:
> (define inner-lambda (lambda (y x1) x1))
> (define (outer x:(by-ref 'a))
> (inner-closure inner-lambda x))
>
> The by-ref-nesss and (top-level) mutability is lost here because of the
> copy operation when x is passed as a by-value argument to MAKE-CLOSURE
> or the inner-closure constructor.
Hmm. That is a good point. But it does result in a very
counter-intuitive interpretation of a by-reference parameter in the eyes
of the programmer. That doesn't make it wrong. Just puzzling.
shap
More information about the bitc-dev
mailing list