Re: Syntactic closures and phasing
Marc Nieper-WiÃkirchen 08 Jan 2022 10:12 UTC
Am Sa., 8. Jan. 2022 um 10:13 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
>
> On Fri, Jan 7, 2022 at 10:48 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>>
>>
>> A Scheme system should catch such a continuation capture. That's one
>> reason why SRFI 226 defines continuation barriers. With them, one can
>> prohibit downward jumps across well-defined boundaries.
>>
>
> Right. My point is that if we think it's up to the runtime to detect such bad usage, carrying an expand-time environment to a runtime environment can be thought the same.
I will reply to your earlier post later.
> As a spec, we have a choice that we say the implementation MUST detect such sase, or SHOULD, or let it be completely implementation-dependent. I think SHOULD be reasonable.
R7RS would probably say "should", R6RS would probably say "must".
For the user, it is more helpful if implementations detect such
behavior and don't crash. If SRFI 226 is supported, it, therefore,
makes a lot of sense in my opinion to force the installation of a
continuation barrier.