Placeholders in chain-* macros?
John Cowan
(23 Aug 2020 20:42 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(23 Aug 2020 21:12 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(23 Aug 2020 21:13 UTC)
|
Re: Placeholders in chain-* macros?
John Cowan
(23 Aug 2020 21:15 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(23 Aug 2020 21:42 UTC)
|
Re: Placeholders in chain-* macros?
Adam Nelson
(28 Aug 2020 02:32 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(28 Aug 2020 05:33 UTC)
|
Re: Placeholders in chain-* macros?
Adam Nelson
(31 Aug 2020 17:01 UTC)
|
Re: Placeholders in chain-* macros? Marc Nieper-Wißkirchen (31 Aug 2020 17:28 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(02 Sep 2020 07:26 UTC)
|
Re: Placeholders in chain-* macros?
Adam Nelson
(06 Sep 2020 16:54 UTC)
|
Re: Placeholders in chain-* macros?
Marc Nieper-Wißkirchen
(06 Sep 2020 17:14 UTC)
|
Am Mo., 31. Aug. 2020 um 19:01 Uhr schrieb Adam Nelson <xxxxxx@nels.onl>: > > I can't actually think of an example where nested `nest` would be used. I used that as the justification for the placeholder parameter because you mentioned it in a previous email thread: > > https://srfi-email.schemers.org/srfi-197/msg/15006221/ > > > PS: For your nest macros, the placeholder has a similar status like > > the ellipsis in syntax-rules. In order to allow to nest nest macros, > > please add an optional placeholder parameter to the nest macros just > > as SRFI 46 does for syntax-rules. For the standard placeholder, you > > need the free-identifier=? equality test; for an optional one, you > > probably need the bound-identifier=? equality test. When I wrote this, I momentarily had the idea that nest would replace the underscore throughout the whole s-expression at not only at top-level. > There is a practical use for this placeholder, though. I use `nest` to define the `or` and `and` patterns in Schemepunk's SRFI-204-like `match`. The macro could generate a `nest` step with an underscore symbol (as a `match` pattern), even though that underscore is not meant as a placeholder. Importing _ under a different name doesn't work, since nest's _ and match's _ are the same identifier. So it needs an alternate placeholder. Thanks! That makes perfect sense. May I suggest that you add this practical use as a rationale for specifying the "_" explicitly?