<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="markdown-here-wrapper" data-md-url="" style="">
<p style="margin: 0px 0px 1.2em !important;">On 14/03/2024 19:04,
Clement Cherlin wrote:</p>
<p style="margin: 0px 0px 1.2em !important;"></p>
<div class="markdown-here-exclude">
<p></p>
<blockquote type="cite" cite="mid:CALEU8=ypsj+2rXRRkzLa9fRvWPKe4PQ1fdh6ZM9ki3scDcZPtA@mail.gmail.com">
<pre>What if instead of the extremes of a myriad of processors, or a single
template prefix, or no prefix and complex/confusing context rules, we
have exactly two prefixes? To avoid bikeshedding (obviously, the final
names would be much shorter), I will call them TEMPLATE and
INTERPOLATE. These are semantically identical to the old RAW and STR
processors respectively, but syntactically have no "." between them
and the leading quote.
TEMPLATE"hey \{name}" -> StringTemplate
INTERPOLATE"hey \{name}" -> String</pre>
</blockquote>
<p></p>
</div>
<p style="margin: 0px 0px 1.2em !important;"></p>
<p style="margin: 0px 0px 1.2em !important;">See my latest email
to Guy.</p>
<p style="margin: 0px 0px 1.2em !important;">Having <em>different</em>
prefix for interpolated vs. raw template literals does help a
bit with the case I brought up there - as here we’re basically
in a world where a string literal with embedded arguments <em>must</em>
have a suitable prefix.</p>
<p style="margin: 0px 0px 1.2em !important;">A possible point
which is not too far from where we are today is just reuse STR
and RAW as prefixes, but also make RAW <em>optional</em>, so
that:</p>
<ul style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">it can be used to disambiguate
interpretation of strings w/o embedded expressions;
<ul style="margin: 1.2em 0px;padding-left: 2em;margin: 0px; padding-left: 1em;">
<li style="margin: 0.5em 0px;">it can be the <em>default</em>
if you type something that does have embedded expressions
(e.g. nudge towards the safer route if there’s embedded
expressions)</li>
</ul>
</li>
</ul>
<p style="margin: 0px 0px 1.2em !important;">Another idea that
came up was, instead of just using prefixes, use <em>types</em>:</p>
<ul style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">the STR prefix is written String</li>
<li style="margin: 0.5em 0px;">the RAW prefix is written
StringTemplate</li>
</ul>
<p style="margin: 0px 0px 1.2em !important;">This is slightly
better (say what you mean!) - but a potential problem is that
one might wonder why a special syntax is needed given a cast is
just a pair of <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">(</code>
and <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">)</code>
away…</p>
<p style="margin: 0px 0px 1.2em !important;">Maurizio</p>
<div title="MDH:PHA+PGJyPjwvcD48ZGl2IGNsYXNzPSJtb3otY2l0ZS1wcmVmaXgiPk9uIDE0LzAzLzIwMjQgMTk6
MDQsIENsZW1lbnQgQ2hlcmxpbiB3cm90ZTo8YnI+PC9kaXY+PGJsb2NrcXVvdGUgdHlwZT0iY2l0
ZSIgY2l0ZT0ibWlkOkNBTEVVOD15cHNqKzJyWFJSa3pMYTlmUnZXUEtlNFBRMWZkaDZaTTlraTNz
Y0RjWlB0QUBtYWlsLmdtYWlsLmNvbSI+PHByZT5XaGF0IGlmIGluc3RlYWQgb2YgdGhlIGV4dHJl
bWVzIG9mIGEgbXlyaWFkIG9mIHByb2Nlc3NvcnMsIG9yIGEgc2luZ2xlCnRlbXBsYXRlIHByZWZp
eCwgb3Igbm8gcHJlZml4IGFuZCBjb21wbGV4L2NvbmZ1c2luZyBjb250ZXh0IHJ1bGVzLCB3ZQpo
YXZlIGV4YWN0bHkgdHdvIHByZWZpeGVzPyBUbyBhdm9pZCBiaWtlc2hlZGRpbmcgKG9idmlvdXNs
eSwgdGhlIGZpbmFsCm5hbWVzIHdvdWxkIGJlIG11Y2ggc2hvcnRlciksIEkgd2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