[racket] Macros and literal-id

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Aug 9 13:01:38 EDT 2011

Prabhakar Ragde wrote at 08/09/2011 12:05 PM:
> Neil Van Dyke wrote:
>> The hardest macro tasks, in "syntax-rules",
>> become opportunities to show off how well one can do scary-looking CPS
>> that's really expensive at expansion time.
> For my edification, as well as that of other macro newbies, can you 
> give some examples of this, and how syntax-case can be more 
> expressive? Thanks. --PR

Someone other than me can do a better job of explaining, but I'll 
quickly and gauchely link to my blog, for some things that were harder 
in "syntax-rules" than they would've been in "syntax-case":


Then there are things that are possible in Racket's "syntax-case" but 
impossible in RnRS "syntax-rules" (unless perhaps your name is Oleg).  
My forthcoming "html-template" package, for example, is implemented 
using "syntax-case", so that it can generate large strings of HTML at 
expansion time instead of while you're trying to serve Web pages quickly.


Posted on the users mailing list.