Re: Initial comments & questions Andre van Tonder 25 Mar 2004 20:32 UTC

On Tue, 23 Mar 2004 wrote:

> I have yet another idea.
> (SYNTAX-SEQUENCE <clause> ... <final>)
>   <clause> ->
>       (COMPUTE <pattern> <syntactic computation>)
>     | (LET <pattern> <form>)
>     | (<syntactic computation>)
>   <final> -> <syntactic computation>
> COMPUTE binds a pattern, a SYNTAX-RULES pattern, to the result of a
> syntactic computation.  LET simply binds a SYNTAX-RULES pattern with a
> form, not a computation.  The third kind of clause ignores the result
> of a syntactic computation.  The result of the SYNTAX-SEQUENCE form is
> the result of the FINAL.

I think these are all expressible more simply with bind only (assuming we
call it syntax-bind). E.g.,

(syntax-bind ((x    (syntax-reverse (x y z))
              (y    (syntax-return (u v w))
              (void (syntax-message "Debug message"))
  (syntax-append x y))

Here the first line does what COMPUTE does, the second line does what
LET does, and the third line is a syntactic computation with a throwaway

> I also have a suggestion to rename SYNTAX-BIND to SYNTAX-EXTEND, as the
> monadic >>= operator is often differently named.

Good idea.