Re: apparent bug in sample implementation of SRFI 148 William D Clinger (20 Jul 2017 08:23 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (21 Jul 2017 12:41 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (21 Jul 2017 18:55 UTC)
Re: apparent bug in sample implementation of SRFI 148 John Cowan (22 Jul 2017 00:14 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (22 Jul 2017 00:54 UTC)
Re: apparent bug in sample implementation of SRFI 148 John Cowan (22 Jul 2017 04:46 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (22 Jul 2017 07:45 UTC)
Re: apparent bug in sample implementation of SRFI 148 Alex Shinn (22 Jul 2017 07:17 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (22 Jul 2017 08:06 UTC)
Re: apparent bug in sample implementation of SRFI 148 Alex Shinn (22 Jul 2017 08:48 UTC)
Re: apparent bug in sample implementation of SRFI 148 Arthur A. Gleckler (22 Jul 2017 15:01 UTC)
Re: apparent bug in sample implementation of SRFI 148 Arthur A. Gleckler (24 Jul 2017 05:57 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (22 Jul 2017 09:13 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (22 Jul 2017 11:16 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (23 Jul 2017 11:18 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (23 Jul 2017 13:34 UTC)
Re: apparent bug in sample implementation of SRFI 148 Alex Shinn (24 Jul 2017 03:23 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (24 Jul 2017 03:46 UTC)
Re: apparent bug in sample implementation of SRFI 148 Al Petrofsky (24 Jul 2017 03:41 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (25 Jul 2017 00:33 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (25 Jul 2017 05:24 UTC)
Re: apparent bug in sample implementation of SRFI 148 Alex Shinn (27 Jul 2017 04:37 UTC)
Re: apparent bug in sample implementation of SRFI 148 William D Clinger (27 Jul 2017 11:57 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (24 Jul 2017 03:26 UTC)
Re: apparent bug in sample implementation of SRFI 148 Marc Nieper-Wißkirchen (24 Jul 2017 06:19 UTC)

Re: apparent bug in sample implementation of SRFI 148 William D Clinger 21 Jul 2017 18:55 UTC

Marc Nieper-Wißkirchen wrote:

> P.S.: Should SRFI 147 ever become a part of (scheme base) in Larceny, I
> think it is only fair when Larceny changes the semantics for
> let(rec)-syntax as defined by SRFI 147 to the R6RS-compatible (splicing)
> semantics of Larceny.
>
> If Will could give me a hint on this, I would recode SRFI 148 more
> defensively (i.e. taking care of (let () ...) wrappers around
> let(rec)-syntax.

You could wrap a (let () ...) around every use of let-syntax or
letrec-syntax for which you want the definitions that result from
expanding the body to be limited to a new local contour.

If there are a number of those, you can define your own versions
of let-syntax and letrec-syntax that do that automatically.  Note
that (let () (let () ...)) is equivalent to (let () ...), so it
won't hurt anything if the native let-syntax and letrec-syntax
are introducing new local contours already.

So far as I can see, the R7RS (small) document does not require
let-syntax and letrec-syntax to introduce new local contours, so
any code that depends on that behavior is non-portable.  As you
have pointed out, five members of WG1 did vote to break backward
compatibility with the R6RS by requiring a new local contour, but
that decision does not appear to have found its way into the R7RS
document as ratified.

Because there do seem to be some programmers who believe the R7RS
requires let-syntax and letrec-syntax to introduce local contours,
I have added a new --r7strict mode to Larceny that disables several
of Larceny's extensions to R7RS, including that aspect of the R6RS
semantics for let-syntax and letrec-syntax.  I would encourage you
and others to write portable code instead of relying on such
implementation-specific modes and behaviors.

Will