Re: Keywords reduced Marc Nieper-Wißkirchen 20 Oct 2019 21:10 UTC

Am So., 20. Okt. 2019 um 12:17 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
>
>
>
> On Sun, Oct 20, 2019 at 12:12 AM Shiro Kawai <xxxxxx@gmail.com> wrote:
>>
>>
>> (3) You want to read a list of arguments from file and pass them to 'z'.  'z' takes keyword
>>      arugments.  If keywords should be identifiers, how you can convert symbols read from
>>      the file to appropriate identifiers?
>
>
> Actually it doesn't even need to be read from a file.   You may want to construct the argument
> list separately from the actual call.
>
>    (define z-args `(arg1 arg2 test: ,eqv?))
>    ...
>    (apply z z-args)
>
> How can you include test:, if that needs to be an identifier?

Obviously, when we want hygienic identifiers as keywords, argument
lists cannot be constructed using quasiquote alone.

So far, we have only debated about the semantics, not about the
syntax. But one conceivable syntax could be that a keyword like
`test:' can be used as keyword in a special form so that your example
becomes:

(define z-args `(arg1 arg2 ,(test: eqv?)))

>

--
Prof. Dr. Marc Nieper-Wißkirchen

Universität Augsburg
Institut für Mathematik
Universitätsstraße 14
86159 Augsburg

Tel: 0821/598-2146
Fax: 0821/598-2090

E-Mail: xxxxxx@math.uni-augsburg.de
Web: www.math.uni-augsburg.de/alg/mitarbeiter/mnieper/