|
From: | Hans Aberg |
Subject: | Predicate of define-syntax |
Date: | Sat, 8 Jan 2011 13:00:13 +0100 |
On 8 Jan 2011, at 00:22, Andreas Rottmann wrote:
If you are writing your own macro, I find 'define-syntax' easier:It's not only easier, it also not inherently broken (as `define-macro'is). See <http://en.wikipedia.org/wiki/Hygienic_macro> for a discussionof the hygiene issue.
It seems that one cannot check that it is a macro, though. For some reason, they do not self-evaluate.
(macro? cond) ~> #t (define-syntax def (syntax-rules () ((def x ...) (define x ...)) )) (macro? def) ~> error
[Prev in Thread] | Current Thread | [Next in Thread] |