<div>In case any lurkers like me are interested.</div>
<div><a href="http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html">http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html</a></div>
<div> </div>
<div>Stephen</div>
<div><br> </div>
<div class="gmail_quote">On Tue, Apr 5, 2011 at 12:51 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On Mon, Apr 4, 2011 at 6:25 PM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>> Four hours ago, Robby Findler wrote:<br>>><br>>> It looks like a great macro essay for a certain crowd (altho the<br>
>> essay seems to insult that selfsame crowd; perhaps you are assuming<br>>> that that crowd is into S&M?).<br>><br>> Where's the insult? (I didn't mean any insult -- the only thing I can<br>
> think of is the "nostalgia" reference, which is not an insult but the<br>> often expressed sentiment for "a simple system, like `defmacro'".)<br><br></div>Well, the scare quotes are a way to put down things, generally speaking.<br>
<div class="im"><br>><br>>> Some comments:<br>>><br>>> - I probably would have used #` in the second while macro. Yes, I<br>>> see you mention it later, but doing it at that point seems to fit<br>
>> with what the reader's been given at that point<br>><br>> Well, that's one point where the purpose of the document is different<br>> from a generic guide: my main goal was to write a quick intro to<br>
> people who are familiar with `defmacro' -- so I wanted to make it very<br>> clear that it's the same kind of thing, only with wrapped sexprs<br>> instead of raw ones. In this case, I think that the long route is<br>
> better -- it shows that the extra tools (like #`) make things easier<br>> only after you're aware of what goes on (and the fact that there's no<br>> complicated magic involved, which is the frequent complain against<br>
> `syntax-case').<br><br></div>Yes, and the second while macro is a fine place to say that, in my<br>opinion. Indeed, it seems like the most natural point to go to next<br>and then to continue later to say what is happening with the # on the<br>
front. This is just how your text is already building (in a good way<br>imo).<br>
<div class="im"><br>><br>>> - it would be good if you did some kind of a computation at compile<br>>> time, preferably to demonstrate an interesting computation one<br>>> should want to do at compile time. Maybe a macro that embeds a<br>
>> formatted source location into its output?<br>><br>> Good idea, I'll add something.<br>><br>><br>>> - cpp macros are, I believe, based on lexemes, not strings (so you<br>>> cannot have an unclosed string in a macro or something).<br>
><br>> Yeah, I couldn't find a way to phrase it better than stick a random<br>> "roughly" in. Using "lexemes" is a good word to describe it, but it's<br>> a little too opaque -- any ideas for something more light?<br>
<br></div>"lexical tokens, like strings, parens, ..."?<br>
<div class="im"><br>><br>>> At least nowadays they are.<br>><br>> Yes -- I definitely have used `#define's with a double-quote opener.<br><br></div>I think you can still pass an arg to gcc to get the old behavior back.<br>
<font color="#888888"><br>Robby<br></font>
<div>
<div></div>
<div class="h5"><br>_________________________________________________<br> For list-related administrative tasks:<br> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a></div>
</div></blockquote></div><br><br clear="all"><br>