
Reading expander/run/linklet.rkt. Why are the imports boxed? https://github.com/racket/racket7/blob/master/pkgs/expander/run/linklet.rkt#L166

@soegaard2 Linklets import and export variables (as opposed to values), and the variables are potentially mutable

But the “schemify” linklet-to-lambda compiler performs the modest cross-linklet optimization of avoiding the box if the variable is never mutated

Ok. Not sure when mutation is needed though. Reading the code for the various subsystems help. Biggest problem so far was connecting the dots in how the linklets in a bundle needs to be evaluated. Reading eval-module helped.

Modules don’t often export variables that are set!
ed, but it happens sometimes, and then the corresponding linklet will need to export a mutable variable

Ok. Good to know.

banning set!
and requiring mutation with boxes instead of bindings has always seemed like a decent racket2 idea to me

interesting idea, I hadn’t thought about that. Most of the time when I use set!
it’s because I needed to save some simple data. I can see using a box and set-box!
would be a perfectly good substitution for set!