Of course–it's good that Clojure does that. :) Along with the fact
that it's intuitive, docstrings are in a standardized style to print
nicely with (doc):

(defn foo
  "First line is wrapping around
  and is indented by two spaces.
  But this is only because (doc) allows for this,
  indenting the first line by two too."
  ...)

(doc foo) would then print:

foo
([args])
  First line is wrapping around
  and is indented by two spaces.
  But this is only because (doc) allows for this,
  indenting the first line by two too."

But, as you said, I'd like a way to add folding over when I want it,
which is often. I think that backslashes are a good way of doing this
without breaking anything. As William said, unfortunately, it would
take a little work getting rid of folded lines' indentation. But I
personally think it would be well worth it without being too
confusing.

On Apr 4, 10:15 am, Joshua Fox <joshuat...@gmail.com> wrote:
> Of course, Clojure's treatment of simple multiline literal strings already
> handles them intuitively
>
> user=> "a multiline
> string"
> "a multiline\nstring"
> user=>
>
> Java and many other popular languages don't do this.
>
> But I understand that you'd like to have the literal newline ignored.
>
> Joshua
--~--~---------~--~----~------------~-------~--~----~
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