I learned about identifier macros mostly from scrambling through the
racket sources. There they are often seen in places where macros are used
instead of functions to avoid the cost of a function call. Normally.
macros have the drawback that they can't be passed around or applied like
I'd like to improve the documentation, but I can't tell which part
you're talking about. (The only place where I can find identifier
macros is in the Guide, but that's about `syntax-rules' versus
`syntax-id-rules'.) Can you point to the part that you're reading and
the specific text that seems
I think two additions/refinements would be good here:
1. The section on identifier macros in the Guide (16.1.5) should mention that
define-syntax introduces short-hands for identifiers, period. That is, the
following interaction works perfectly fine:
(define-syntax (foo stx) #'7)
(+ foo
At Wed, 5 Dec 2012 09:41:37 -0500, Matthias Felleisen wrote:
I think two additions/refinements would be good here:
1. The section on identifier macros in the Guide (16.1.5) should mention that
define-syntax introduces short-hands for identifiers, period.
I think a `define-syntax' that
On looking back, my confusion was not entirely due to the documentation,
but partly from my own expectations coming in to it. If I just look up
identifier macro, trying to figure out how to write one, I get a link to
section 16.1.5. This does not directly state the context involving
At Wed, 5 Dec 2012 14:25:29 -0500, Carl Eastlund wrote:
On looking back, my confusion was not entirely due to the documentation,
but partly from my own expectations coming in to it. If I just look up
identifier macro, trying to figure out how to write one, I get a link to
section 16.1.5.
Actually I would hope that section 1.2 (syntax model) in the reference would
explain exactly how macros are invoked. Unless I'm missing something it never
mentions exactly what syntax object is passed to the transformer function once
a macro binding is observed.
It could either go in paragraph
8 hours ago, Carl Eastlund wrote:
I'm confused about so-called identifier macros. I had thought
that ordinary transformers bound to functions could only transform
application-position references to themselves, and that a set!
transformer was required to transform bare references and set!
8 matches
Mail list logo