[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comments on and questions about SRFI 93
On Jun 26, 2006, at 10:37 AM, dyb@xxxxxxxxxxxxxx wrote:
* In section 3.6, the paragraph describing ellipses says, "otherwise,
the expander would not be able to determine how many times the
should be repeated in the output." I've never understood precisely
how Scheme macro systems decide how many expansions to do for a
particular use of ellipses in the output template. I can usually
intuit what will happen, but I've never had a concrete understanding
of the algorithm. Would it be possible to expand on the algorithm
here to make it absolutely clear?
Probably. I've made a note to try to do this at some point.
Both k and e2 are directly followed by an ellipsis, and the pattern
containing the two of them is also followed by an ellipsis. So
be followed by at least two ellipses in the output. They are. k
are each directly followed by an ellipsis in the template, and the
template containing both is also followed by an ellipsis, the one
marked. If you think about each ellipsis as a mapping operation, the
marked ellipsis maps a procedure that constructs one cond clause
list of a list of k's, a list of e1's and a list of a list of
ellipsis following k in the template maps the identity function
list of k's---in other words, it simply returns the list of k's.
Ah, it's clear now. I'll read the implementation to be sure I
understand perfectly, but I now see the algorithm. Thanks.
* In section 3.10, a definition is given for `identifier-syntax', but
the first clause appears to be missing a call to
`make-variable-transformer', which I've added here:
Actually, the call to make-variable-transformer should not appear, so
that the expander never passes a set! expression to the transformer
that form of identifier-syntax is used.
Ah, I see. Now it even seems obvious. Thanks.