@mflatt Is there any semantics for transfering the defined but not exported variables to the target? (if it doesn’t already have it - or if we’re producing a new instance)
The following seems to be producing 3
on racket but #f
on racketcs : (instance-variable-value (instantiate-linklet (compile-linklet '(linklet () () (define-values (x) 3))) null) 'x (lambda () #f))
Probably Racket CS does not handle unexpected definitions correctly, since the expander does not generate them.
But I also had in mind that maybe compile-linklet
should be able to discard unused, unexported variable.
In any case, the answer to your question is “no” – semantics not pinned down so far
Yeah Chez’s cp0 seems to be completely removing the definition if it’s not used, I can easily do that on Pycket as well