I'm in favor of auto concatenating multiple string literals at
compilation, but I am strongly opposed to doing any sort of formatting
with them.  If you want a new line, you stick a \n in your first
string; if you want a space, you stick it in there as well.  This:

"hello"
    "world"

should translate to "helloworld", not "hello world" or "hello
world" or "hello\n    world".

Vincent.

On Apr 3, 11:41 pm, samppi <rbysam...@gmail.com> wrote:
> I wish I could do this:
>
> (code...
>     "Long error string that doesn't fit within 80 characters but is
> descriptive, \
>      which is good, right?"
>    ...more code...)
>
> (The string above would say, "Long error string that doesn't fit
> within 80 characters but is descriptive, which is good, right?")
>
> People put code on many lines because it's much more readable if lines
> don't get too long. But this is not possible for strings without doing
> calling (str ...). This is relatively expensive, right? (str) has to
> create a new StringBuilder object.
>
> Anyways, it'd be really cool if the Clojure reader did this. My ideal
> would be that indentation before the continuing line would become one
> space, or perhaps something similar. I don't think it would make
> Clojure too much more complicated—in my mind, any small complication
> would be worth the readability. How hard would this be to implement?
> Would this be syntactically ambiguous?
--~--~---------~--~----~------------~-------~--~----~
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
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