Re: SRFI 105: Curly-infix-expressions
Shiro Kawai 27 Aug 2012 16:58 UTC
>From: Alan Manuel Gloria <xxxxxx@gmail.com>
Subject: Re: SRFI 105: Curly-infix-expressions
Date: Mon, 27 Aug 2012 15:58:36 +0800
> The way the current spec is done allows for code like the
> following:
>
> (define {a // b}
> {(unwrap-par-monad a) parallel (unwrap-par-monad b)})
Kind of cute, though I wonder if this can be extended
to handle variable arity operators.
> (define-syntax o
> (syntax-rules ()
> ({a o b}
> (lambda (x) (b (a x))))
> ({a o b o rest o ...}
> {{a o b} o rest o ...})))
>
> Again, this takes advantage of the fact that
> {a o b o rest o ...} means (o a b rest ...)
This is also cute, though it effectively changes the
surface meaning of "x ...".
These two examples are interesting. They don't appeal to me
enough to convince me non-macro approach is good, but others
may feel differently. How about including them in the rationale
section to explain why reader transformation is necessary?
--shiro