[r6rs-discuss] Why can ... and _ not be literals?
Let me point out that, if the r6rs draft did not forbid it, there would be
a very nice solution to using ellipses and underscores /both/ as literals
/and/ as special patterns. The solution would be
(import (r6rs)
(rename (r6rs) (... :::) (_ *)))
(define-syntax foo
(syntax-rules (::: *)
((_ * (x :::) ...) 'matches))))
(foo _ (x ...) (y ...) (z ...)) ==> matches
However, unfortunately currently r6rs forbids this.
On Sun, 24 Jun 2007, David Van Horn wrote:
> I'm
> on the fence with the (incompatilbe) change to underscore to no longer be
> considered a pattern variable.
There is in fact a trivial solution to porting legacy macros
using underscore. Simply put them in a library where you use
(import (except (r6rs base) _))
Cheers
Andre
Received on Mon Jun 25 2007 - 04:40:17 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC