I'm reminded of this article (https://fare.livejournal.com/189741.html), where this Common Lisp macro:
(defmacro nest (&rest r) (reduce (lambda (o i) `(,@o ,i)) r :from-end t))
Has to turn into this in Racket (which isn't quite Scheme): (define-syntax (nest stx)
(syntax-case stx ()
((nest outer ... inner)
(foldr (lambda (o i)
(with-syntax (((outer ...) o)
(inner i))
#'(outer ... inner)))
#'inner (syntax->list #'(outer ...))))))
And was incredibly difficult to reason about. And that author likes Racket.I'm not going to sit here re-evaluating Scheme, year by year, to see whether it's up to snuff yet.
Someone drop me an e-mail when Scheme gets a well-defined, left-to-right evaluation order, and when its imperative forms all return a stable value like #f or whatever.
The smaller standard does not specify a low level macro facility. That doesn't mean that an implementation won't have one. No scheme has syntax-rules only.
I agree that the defmacro is simpler, but nobody said otherwise. The nest macro is more or less perfect for defmacro since it doesn't need hygiene.
If defmacro is so Important, there are several schemes with it out there, and if you really need it it is trivially implemented using low level hygienic macro facilities.
(define-syntax nest
(syntax-rules ()
((nest x) x)
((nest x ... (y ...) z) (nest x ... (y ... z)))))
That one is quadratic according to the author, but for 1050 expands of a nest with 6 levels it is less than 10% slower. Whereas in chez scheme, the difference is even less (for more than 2000 expansions)Edit: Decided to stress test the chez scheme macro expader. for 30000 expansions, it was under 1s using the syntax-case version. I'd say that is very much good enough.