Re: Opaque thought experiment Matthias Neubauer 22 Aug 2005 16:44 UTC

Andre van Tonder <xxxxxx@now.het.brown.edu> writes:

> To make a procedural style of accessing syntax-objects easy, I would
> require syntax versions of all the R5RS list primitives that make sense
>
>    syntax-null?
>    syntax-list?
>    syntax-car
>    ...
>    syntax-cddddr
>    ....
>    syntax-map
>    syntax-for-each
>
> Some of these could have been omitted in favour of just using
> syntax->list. However, I am not a big fan of the syntax->list style of
> programming - it incurs an extra code-walking step and it can expose
> too much if we use it to implement things like cadddr or member.

This looks like as if syntactic objects/syntax trees are only
representable as binary trees labeled with symbols (aka Scheme
lists). I wouldn't do that if I ever wrote a Scheme compiler ...

How about specifying an interface for scheme syntax instead. Something
like ...

make-syntax-lambda-expression
make-syntax-procedure-call
make-syntax-conditional
...

syntax-lambda-expression?
syntax-procedure-call?
syntax-conditional?
...

syntax-conditional-condition
...

-Matthias

--
Matthias Neubauer                                       |
Universität Freiburg, Institut für Informatik           | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany | fax +49 761 203 8052