Hmm, not so sure this is related, but I've often thought it would be
great to have some way of having "embedded" source of other types as a
"special" string defined as normal in the clojure source but marked in
such as way that the editor (vim, emacs, etc) could recognise this and
do formatting, syntax highlighting, etc on that text. Similarly to say
editing HTML with embedded javascript/css/jsp.

This could presumably be done by using some meta-data convention
rather than a reader macro, but this thread brought up the idea.

Any thoughts?

On Fri, Aug 14, 2009 at 5:55 AM, Scott<xsco...@gmail.com> wrote:
>
>
> 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 received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to