[racket] Adding raw string syntax

From: Joan Arnaldich (jarnaldich at gmail.com)
Date: Sun Aug 7 11:44:02 EDT 2011

Hi there!

I'm just starting to learn Racket. One of the thing that I appreciate
most so far is the language extensibility (IMHO, the feature that
makes it so unique compared to other languages...). So, when I
couldn't find anything like python's raw string syntax (strings
introduced by r'') or c#'s @"" strings, I thought... well, let's try a
bit of language DIY...

So I went through the Guide and the brainfudge tutorial and came up
with a solution that worked as I wanted. I blogged about it here:


In fact, I wrote that entry (well most of them...) more as a reminder
for myself than as a tutorial, but I still think it makes sense to
publish it, if only to demonstrate how you can tune the language to
match your personal tastes... something you can't do in every
language, for sure...

The problem is, as I said, that I'm just starting with Racket, so
while the solution works as expected so far, maybe I misunderstood or
skipped something in the documentation and just got it all wrong... so
any comments would be much appreciated, if only to reassure myself...

BTW, I searched the list and the docs for this feature before
implemeting mine... the only thing I found were some old questions on
backslashing in strings for regexes. But maybe this was already
implemented somewhere else and I couldn't find it...

Thanks in advance!


Posted on the users mailing list.