[racket] Some design "whys" of regexps in Racket

From: Rodolfo Carvalho (rhcarvalho at gmail.com)
Date: Fri Jun 3 23:52:32 EDT 2011

On Sat, Jun 4, 2011 at 00:40, Eli Barzilay <eli at barzilay.org> wrote:

> [...]
>
> At a high level, pything *is* doing the same -- it uses strings to
> specify regexps, so both have the *same* syntax.  So this:
>
> > That is writing strings is not exactly the same as writing "strings
> > for a regexp".
>
> is wrong -- it's the same syntax for both.  (At least AFAICT.)
>


Yes, yes... I was simply forgetting about the raw-strings... when writing
regexps I tend to type r"\d{2}\b".
Raw-strings have no backlash escape sequences, so r"\d\b" => '\\d\\b'




> [...]
>
> If you get the impression that I dislike what python does with
> quoting, then that would be a correct one...


You made that enough clear.

I wouldn't fight in a fire combat for none of the languages, but I now I get
the point of Racket's design and as many other lisp-things, that does sound
like a Good Idea.

Consistent, composable, clear, easy to explain.


[]'s

Rodolfo Carvalho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110604/47c6ba7b/attachment.html>

Posted on the users mailing list.