Open s-truax opened 4 months ago
Thanks for the feedback.
In most of this section I'm writing out expressions like (datum->syntax #f '(values "i" "am" "backwards"))
and letting the Scribble evaluator show the result. This is like entering expressions one by one in a REPL.
At this point there is no stx
defined, as there is in the body of the real/full definition of reverse-me
. So if I use that, it would be an error. Instead I just passed #f
, and tried not to get side-tracked into a discussion of lexical context ... because that's a whole other ball of wax. :)
I suppose I could change the definition of reverse-me
also to ignore stx
and use #f
for datum->syntax
... but I feel like that's setting a bad example. I think a better example is as-is, to use the provided, "input" syntax as the lexical context for something like datum->syntax
. Usually that's the right thing to do (but it depends... so again, getting side-tracked is a worry.)
TL;DR: You're right that my step by step sketch differs here from the real/full definition. I appreciate it might confuse people. But the status quo might be less-worse than the alternatives I can think of.
Mainly in this section I'm trying to "de-mythologize" macros and show they're functions from syntax to syntax -- trying to focus folks on that, as the main idea to take away.
I'm loving the guide, I just saw this small error in section 3.3. At the top of the section,
reverse-me
is defined and includes a call todatum->syntax
withstx
as thectxt
(lexical context) argument.Later, at the end of section 3.3, the guide says
Here you can see that the
ctxt
argument is#f
. This might be confusing for people reading the guide.