2 ms·
why? in clojure strings can be multiline already. so there is no point in triple quotes.
by tobik 13y ago
why? in clojure strings can be multiline already. so there is no point in triple quotes.
- drcode 13y agoSo you don't have to escape internal quotes.
- michaelochurch 13y agoTriple quotes tend to come up for two purposes: 1. Long regular expression strings that have quote marks involved. I'm not a fan of large, complex regexes, but a lot of people dislike the line-noise added by escaping. 2. Docstrings that may have quotes in them. It's to remove the string escaping that makes literals look different from the strings they describe.
- tobik 13y agoThanks. Thinking about it, I guess triple-quoted strings also facilitate doctests involving strings that would otherwise be really awkward to read/write.