[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opaque thought experiment

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.



Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> 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