Sudarshan S Chawathe <
xxxxxx@eip10.org> schrieb am Do., 3. Nov. 2016 um 01:13 Uhr:
Here are some comments based on my reading of Draft #3 of SRFI-136. All
except the first are minor, and the first may just be confusion at my
end.
* I'm having difficulty understanding the motivation for the
description of the macro use that appears just before the
Procedures section of the document:
(<type-name (<keyword> <datum> ...))
I looked in the tests included in the sample implementation hoping
to find an example that may help me, but couldn't. (I may have
missed it.) This may well be a problem at only my end, but perhaps
a brief mention of the motivation at this point would be useful to
others as well.
That <type name> is bound to a keyword allows the introspection of the record type at macro-expansion type. The arguments keyword and datum are to allow CPS-techniques for the macro programming.
For example, a pattern matcher written with syntax-rules may want to support matching of record instances and so may want to get hold of the record type structure at macro-expansion time.
Does this explanation help? If so, I'll add some motivating paragraph along these lines.
* In the Procedures section, I believe the third procedure's
specification should read
(record-type-descriptor record)
instead of
(record-type descriptor record)
Will be corrected.
* In the description of make-record-type-descriptor, is the use of
quotes (') before <type name> and (<field spec> ...) signifcant?
The text uses the quote to distinguish the symbol '<type name> from the form <type name>. As this seems to confuse more than it helps, I am going to remove the quote from the text.
The procedural interface is not changing. It justs expects that name evaluates to a symbol.
* (minor) In the Syntax section, I believe the <macro use> rule
extends Section 7.1.3 of R7RS, which may be worth noting (or
not).
Note added.
* (nit) Second paragraph below the grammar in the Syntax section:
Should "define a keyword" read "defines a keyword (for consistency
with the other items)? (I only mention this ridiculously minor item
because the rest of the document is very consistent.)
The wording was copied verbatim from SRFI 131 where the same inconsistency can be found. Grammatically, "defines" is probably the right choice because it is the whole cluster that defines the things to be defined.
Thanks again,
Marc
P.S.: Arthur, I am pushing a pull request with the changes soon.
Regards,
-chaw
To unsubscribe from this list please goto http://www.simplelists.com/confirm.php?u=6GNcf4uDlvn3bUuwvrqorjunSxFDO5L0