`temporarily` should not be splicing construct. Zhu Zihao (12 Jun 2025 05:49 UTC)
Fwd: `temporarily` should not be splicing construct. Arthur A. Gleckler (14 Jun 2025 23:33 UTC)
Re: `temporarily` should not be splicing construct. Marc Nieper-Wißkirchen (30 Jun 2025 06:07 UTC)
Re: `temporarily` should not be splicing construct. Zhu Zihao (01 Jul 2025 03:59 UTC)

Re: `temporarily` should not be splicing construct. Marc Nieper-Wißkirchen 30 Jun 2025 06:06 UTC

Hi Zhu,

thank you very much for your report. Indeed, the reference
implementation should expand into `(let () b1 b2 ...)' in the first
case.

Would you mind opening a pull request?

Thanks,

Marc

Am Do., 12. Juni 2025 um 07:49 Uhr schrieb Zhu Zihao <xxxxxx@163.com>:
>
> In the refrence implementation [1]:
>
> ```
> (define-syntax/who temporarily
>     (lambda (x)
>       (syntax-case x ()
>         [(_ () b1 b2 ...) #'(begin b1 b2 ...)]
>         [(_ ([x e] ...) b1 b2 ...)
>          (with-syntax ([(p ...) (generate-temporaries #'(x ...))]
>                        [(y ...) (generate-temporaries #'(x ...))])
>            #'(let ([p x] ... [y e] ...)
>                (let ([swap (lambda ()
>                              (let ([t (p)]) (p y) (set! y t))
>                              ...)])
>                  (dynamic-wind swap (lambda () b1 b2 ...) swap))))])))
> ```
>
> When use as `(temporarily () b1 b2 ...)`,it expand to (begin b1 b2 ...)
> and become a splicing construct. IMO it should expand to (let () b1 b2
> ...) like Chez's implementation[2]
>
>
> [1]: https://github.com/scheme-requests-for-implementation/srfi-226/blob/master/lib/control-features.sls#L1237
> [2]: https://github.com/cisco/ChezScheme/blob/main/s/syntax.ss#L8346
> --
> Retrieve my PGP public key:
> 执行下列命令以获取我的 PGP 公有密钥:
>
>   gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC
>
> Zihao