<p dir="auto">Here's what I think we should do:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <strong>Keep string interpolation.</strong> It's just too convenient and taking away popular features for language purity is obnoxious.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <strong>Implement interpolation in the parser.</strong> Currently, it's <a href="https://github.com/JuliaLang/julia/blob/71ec5ed0160481232602b50d3a93dc1462a56a62/base/string.jl#L611">implemented as a macro</a>. This leads to problems like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3363777" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/455" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/455/hovercard" href="https://github.com/JuliaLang/julia/issues/455">#455</a>. Instead, we should implement string interpolation for normal strings in the parser, which will allow handling this just fine since it will know when a string is or isn't finished.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <strong>Non-standard string literals are on their own.</strong> This means that non-standard string literals cannot actually fully emulate the behavior of standard string literals. They can use <code class="notranslate">interp_parse</code> to get close, but they won't be able to handle string literals in interpolated expressions [<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3363777" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/455" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/455/hovercard" href="https://github.com/JuliaLang/julia/issues/455">#455</a>]. That's fine. You can either have full-blown parser-supported string interpolation <em>or</em> you have a custom string literals, but not both at the same time. This is an acceptable compromise.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <strong><del>Use</del> Allow string literal juxtaposition for concatenation.</strong> Merge <a href="https://github.com/JuliaLang/julia/commits/jb/strjuxtapose">this branch</a> and make string literal juxtaposition <del>the</del> a syntax for string concatenation. If you want to concatenate two variables as strings, you can do <code class="notranslate">foo "" bar</code>, which parses as <code class="notranslate">string(foo,bar)</code> rather than <code class="notranslate">string(foo,"",bar)</code>. <del>If you need to reference the string concatenation operation as a function, you use <code class="notranslate">string</code>. This is not really any different than having special syntax for e.g. indexing.</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del><strong>Deprecate <code class="notranslate">*</code> for string concatenation.</strong> This was a cute experiment, but it's bad. The biggest problem is the <code class="notranslate">Char*Char</code> issue, which we should not deprecate, but rather just remove (and perhaps make <code class="notranslate">Char</code> a proper integer type again?).</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <strong>Parse multiline string literals as macro calls.</strong> When an unprefixed multiline string literal (i.e. triple-quoted string) is encountered, handle interpolation in the parser and emit it as a macro call (maybe <code class="notranslate">@mstr</code>?) for further processing. When a prefixed multiline string literal is encountered, no interpolation is done, but the string is passed off to an appropriate macro.</li>
</ul>
<p dir="auto">Regarding the last point, consider the following:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# note the indentation
  &quot;&quot;&quot;
  Four score and $n years ago...
  &quot;&quot;&quot;"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> note the indentation</span>
  <span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">  Four score and <span class="pl-v">$n</span> years ago...</span>
<span class="pl-s">  <span class="pl-pds">"""</span></span></pre></div>
<p dir="auto">Should be equivalent to:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@mstr(&quot;\n  Four score and &quot;, n, &quot; years ago...\n  &quot;)"><pre class="notranslate"><span class="pl-c1">@mstr</span>(<span class="pl-s"><span class="pl-pds">"</span><span class="pl-cce">\n</span>  Four score and <span class="pl-pds">"</span></span>, n, <span class="pl-s"><span class="pl-pds">"</span> years ago...<span class="pl-cce">\n</span>  <span class="pl-pds">"</span></span>)</pre></div>
<p dir="auto">The <code class="notranslate">@mstr</code> macro can handle indentation stripping a la <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1093930" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/70" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/70/hovercard" href="https://github.com/JuliaLang/julia/issues/70">#70</a> by looking at the trailing whitespace of the last string literal macro argument and stripping that from the indentation of all the string literal arguments.</p>
<p dir="auto">Prefixed triple-quoted strings should emit macro calls just like prefixed single-quoted strings do, although I'm not sure whether they should call a different macro or the same one. Having to have define different macros to support both normal and triple strings is annoying, but on the other hand, you might want to handle triple-quoted literals specially.</p>
<p dir="auto">I apologize if this is a duplicated issue.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12205732/15939506/ef73fe2e-2e45-11e6-954e-1bb48832bd16.png"><img src="https://cloud.githubusercontent.com/assets/12205732/15939506/ef73fe2e-2e45-11e6-954e-1bb48832bd16.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12205732/15939411/92a10e12-2e45-11e6-8d18-6236d8bd04a4.png"><img src="https://cloud.githubusercontent.com/assets/12205732/15939411/92a10e12-2e45-11e6-8d18-6236d8bd04a4.png" alt="image" style="max-width: 100%;"></a></p>