Email list hosting service & mailing list manager

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)

Re: Comments on draft #3 Marc Nieper-Wißkirchen 05 Jun 2020 06:18 UTC

Have you been able to test my patch, by the way?

Am So., 3. Mai 2020 um 18:10 Uhr schrieb Marc Nieper-Wißkirchen
<xxxxxx@nieper-wisskirchen.de>:
>
> With the attached patch, SYNTAX-RULES macros now allow a single identifier as a top-level pattern, which matches the whole form:
>
> (define-syntax foo
>   (syntax-rules ()
>     (x (begin (display 'x) (newline)))))
>
> foo ;Expands into code that displays "foo".
>
> Am So., 3. Mai 2020 um 17:51 Uhr schrieb Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de>:
>>
>> Am So., 3. Mai 2020 um 11:06 Uhr schrieb Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de>:
>>
>> [...]
>>
>>>
>>> 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).
>>
>>
>> To prove that my bet is not insubstantial, I have attached a patch for the Chicken implementation of Scheme. With the patch (it may need to be polished by the maintainers of Chicken), transformers associated with keywords are now also invoked when the keyword is not in head position.
>>
>> The following example will expand `foo' into #f and display "foo" on the console.
>>
>> (define-syntax foo
>>   (er-macro-transformer
>>     (lambda (x r c)
>>       (display x)
>>       (newline)
>>       #f))
>>
>> foo
>>
>> Although I have just installed the Chicken source code, which is still alien to me, it took me less than two hours to get the thing done.  I shouldn't be a hurdle for other implementations as well.
>>
>> Marc