|
|
|
|
|
by ThatGeoGuy
4108 days ago
|
|
I don't mean to be a pedant, but the author mentions a "syntax for patterns", basically claiming that Lisp doesn't have one. But, isn't syntax-rules (a la scheme) already a form for matching / macro-ing patterns? From my understanding the author seems to want macros that can be specialized for new forms. I may be confused about what the exact claim is here, but I don't see how this has anything to do with whether or not something is an expression. I don't quite understand how having "not everything is an expression" helps solve this problem. |
|
syntax-rules is a form of pattern matching (mentioned in footnote 2). But it's only for matching on syntax, not on ordinary values. I can't write the fibonacci function using syntax-rules.
The idea behind "not everything is an expression" is that ordinary macros only extend the expressions in a language. But languages have more than expressions to them - they also have patterns, and possibly other syntax classes (loop formats, LINQ, monadic do-syntax). I think those syntax classes ought to be macro-extensible as well. That's what I mean when I say that ordinary macros don't acknowledge that not everything is an expression.
It's rather a roundabout way to say it, I guess.