Re: Syntactic closures and phasing
Marc Nieper-Wißkirchen 08 Jan 2022 08:53 UTC
Am Sa., 8. Jan. 2022 um 02:24 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
>
>
> On Fri, Jan 7, 2022 at 11:47 AM Arthur A. Gleckler <xxxxxx@speechcode.com> wrote:
>
>> Does anyone have any feedback for Marc on the issue of syntactic closures and ahead-of-time expansion of libraries? This is one of the last issues that he wants to address before finalization.
>
>
> Will Clinger told me that he watched Bawden and Rees (or possibly two other iconic figures) arguing about the semantics of some particular SC macro for half an hour or more, and he concluded that if _they_ didn't understand SC completely, he couldn't either -- and that's why Larceny has no SC support.
Understanding the semantics of a particular macro can be more
difficult than understanding the semantics of the expander. (Analyzing
a chess game is generally more difficult than understanding the rules
of chess.) I think I have a clear understanding of what the semantics
of SC (as defined in the MIT/GNU manual) are, but making them work
with other systems including phase-separation and AOT-compiling is not
so clear to me.
It should be added that SC seems to have the same shortcomings as
classical ER when it comes to unhygienic macros.
> The only current SC systems are Chibi, MIT, and Picrin, making it the rarest system other than IR, which is very much a modern invention.
One should test these implementations against the semantics written
down in the MIT/GNU Scheme manual. It's not so clear whether all three
systems will survive as correct implementations.