Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Request for Discussion: user created reader macros
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Scott  
View profile  
 More options Aug 13 2009, 11:55 pm
From: Scott <xsco...@gmail.com>
Date: Thu, 13 Aug 2009 20:55:22 -0700 (PDT)
Local: Thurs, Aug 13 2009 11:55 pm
Subject: Re: Request for Discussion: user created reader macros

On Aug 13, 5:47 pm, Chas Emerick <cemer...@snowtide.com> wrote:

> A good thought, but #"foo" is reader syntax for defining a regular  
> expression with the pattern "foo". :-/

Sorry about that, I'm not experienced at Clojure, but I should have
been more clear.  The first important part isn't which character
triggers the arbitrary string literal (as you point out, #" is already
taken), but that you get to choose the terminating delimiter such that
it doesn't interfere with your DSL.  The second part is that once you
can cleanly express arbitrary string literals, a regular macro can
substitute for a reader macro and avoids the namespace issues.

> Double-quoted strings are decent for stuff like this. (Triple-quotes  
> in python always appealed to me, though triple-quoting things can get  
> tiring.)

I use Python's triple quotes too, but you may want to create a DSL
that can contain both ''' (triple single quote) and """ (triple double
quote) in it.  (For instance if you were embedding Python source. :-)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.