News for hackers. Stuff that matters.
Re:Typed, modular macros for OCaml by naasking on Saturday November 26, 2016 @02:25PM (#13045412)
> There are some difficulties with moving arbitrary values between phases: it's easy to move an int or a list, but what about a mutable reference or a closure?

Wasn't this already answered by "Closing the Stage" [1]?

[1] http://lambda-the-ultimate.org/node/2575

Re:Typed, modular macros for OCaml by yallop on Saturday November 26, 2016 @04:29PM (#13045971)
"Closing the Stage" is about a different interaction between staging and closures: that (with some care) staging constructs can be elaborated into closures in an unstaged calculus.

The problem with moving arbitrary values between phases with macros is that values can refer to bits of the runtime environment that cease to exist when compilation is finished.

Re:Typed, modular macros for OCaml by naasking on Saturday November 26, 2016 @05:05PM (#13046157)
> that (with some care) staging constructs can be elaborated into closures in an unstaged calculus.

Exactly, which seems to provide the necessary semantics for references that you mentioned. Clarifying staging semantics for difficult abstractions like refs by elaboration into well understood closure semantics was the point of the paper.