2009/10/13 B Smith-Mannschott <bsmith.o...@gmail.com> > > On Mon, Oct 12, 2009 at 01:31, James Reeves <weavejes...@googlemail.com> > wrote: > > > > What if you need to use braces? It seems to me that any syntax for > > representing long strings needs a terminator that is unlikely to occur > > within the string itself. For example, Python uses """, and XML CDATA > > uses ]]>, both of which are character sequences unlikely to turn up in > > a string. By contrast, an ending brace } is not rare enough to be used > > as a terminator, IMO. > > Yes, please. I'd like to pile on here with a few ideas and questions > > (0) I'm not feeling the itch for verbatim strings, seeing as clojure > already does multi-line literals (with escaping) and has special > syntax for regex patterns. > > (1) If it's all the same to everyone else, just use python's > triple-quotes. In practice, they work well enough, but if we're using > them for verbatim strings there still wouldn't be a way to embed, e.g. > a code fragment demonstrating use of a raw string in a a raw string. > Is this so terrible? >
What I really miss most is the equivalent of python's triple-quotes, which allow to not have to escape double quotes. Cheers, -- Laurent > > (2) Perlish/Sedish choose-your-own-quote has always struck me as an > ugly hack. More important though are worries about making tooling more > complicated: > > How much more complex would this make, e.g. correct syntax > highlighting in emacs, in eclipse? > What about tools that wish to read clojure code as data but are not > themselves clojure? We wouldn't be doing them any favors by > unnecessarily complicating the surface syntax. > > (3) Perhaps something akin to Lua's approach (mentioned previously in > this thread) could address the limitations of (1) without the uglyness > of (2). > > Just my 2c > Ben > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---