3 ms·
I think the parent meant that R6RS has `syntax-rules`, which has enough power to implement CL `defmacro` as well as `syntax-case`.
by Straw 1y ago
I think the parent meant that R6RS has `syntax-rules`, which has enough power to implement CL `defmacro` as well as `syntax-case`.
- ashton314 1y agoMy mistake: R6RS has `syntax-rules`, not `syntax-case` as far as I can tell. However, `syntax-rules` and `syntax-case` are equivalent in power. [1] It does not have the same power as `defmacro`: you cannot define general procedural macros with `syntax-rules`, as you are limited to the pattern-matching language to compute over and construct syntax objects. [1]: https://docs.racket-lang.org/reference/stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax-rules%29%29 https://docs.racket-lang.org/reference/stx-patterns.html#%28...
- shawn_w 1y agoI think you got your wires crossed. R5 and R7 only have `syntax-rules` macros. R6 has both (`syntax-rule` can be trivially defined as a `syntax-case` macro). R6 having `syntax-case` macros is one of the more controversial things about it; a surprising number of implementers don't care for them.
- ashton314 1y agoI found the relevant documentation and you are absolutely correct and I was mistaken. Thank you for setting me straight. https://www.scheme.com/tspl4/syntax.html#./syntax:h3 https://www.scheme.com/tspl4/syntax.html#./syntax:h3