Email list hosting service & mailing list manager

Re: Are the splicing versions a drop-in replacement for the non-splicing ones? Marc Nieper-Wißkirchen (26 May 2020 12:52 UTC)

Re: Are the splicing versions a drop-in replacement for the non-splicing ones? Marc Nieper-Wißkirchen 26 May 2020 12:52 UTC

Am Di., 26. Mai 2020 um 14:33 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
>
> Are there any situations where the splicing versions could not serve as
> a drop-in replacement for the non-splicing ones?

Theoretically, yes.

(let ()
  (define foo 1)
  (define bar foo)
  (let-syntax ()
    (define foo bar)
    foo))

evaluates to 1, but would be an error if let-syntax is replaced by its
splicing version. Thus, we cannot make the normal R7RS version
silently splicing. If R7RS were done from scratch, it would make sense
to make the splicing behavior the usual behavior, but we hadn't
captured a continuation in 2013 to which we could now jump.

Marc