Comments on draft #3
Marc Nieper-Wißkirchen
(26 Apr 2020 10:22 UTC)
|
||
(missing)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(27 Apr 2020 05:50 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(02 May 2020 21:08 UTC)
|
||
Re: Comments on draft #3
John Cowan
(02 May 2020 22:11 UTC)
|
||
Re: Comments on draft #3 Marc Nieper-Wißkirchen (03 May 2020 09:06 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(03 May 2020 15:51 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(03 May 2020 16:10 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(05 Jun 2020 06:19 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(03 May 2020 13:56 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(03 May 2020 14:03 UTC)
|
||
Re: Comments on draft #3
John Cowan
(02 May 2020 22:56 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(04 May 2020 09:34 UTC)
|
||
Re: Comments on draft #3
John Cowan
(05 May 2020 01:05 UTC)
|
||
Re: Comments on draft #3
Marc Nieper-Wißkirchen
(05 May 2020 07:11 UTC)
|
Am So., 3. Mai 2020 um 00:11 Uhr schrieb John Cowan <xxxxxx@ccil.org>: > I would be happy to see this macro. I did a little investigation, and found that identifier-syntax is supported iff syntax-case is. I had hoped that at least some Schemes supported it separately from syntax-case. I bet that implementing identifier macros in any Scheme system is a work of less than one day each. Already now every Scheme system handles macro keywords, which are not in head position, (usually by throwing an error). To make it usable in systems without ER-MACRO-TRANSFORMER and SYNTAX-CASE, a top-level pattern in SYNTAX-RULES, which just consists of an identifier has to be allowed (as all other patterns won't match). Supporting variable transformers (identifier macros that can be used as an argument to SET!) may be more complicated, but these are not necessary for the use cases discussed here. IDENTIIFIER-SYNTAX is a syntax transformer, which, in the absence of variable transformers, is just: (define-syntax identifier-syntax (syntax-rules () ((_ e) (syntax-rules () ((_ x (... ...)) (e x (... ...))) (_ e))))) The last rule of the inner SYNTAX-RULES is an example of the extended top-level pattern I mentioned above. Then you can do, say, (define-syntax π (identifier-syntax 3.14159)) and without any help from the optimizer or the linker, π will behave as the numerical constant. Marc