I found a few good references on guidelines for macros:
http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg02079.html
I can't end this without not posting my little assert macro
(define-syntax (assert stx)
(syntax-case stx ()
[(_ expr)
(quasisyntax/loc stx
(unless expr
(error 'assert (format "~a lineno ~a: ~s failed"
#,(syntax-source stx)
#,(syntax-line stx)
(quote expr)))))]))
No comments:
Post a Comment