<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I think that introducing another escape character is not a good idea.</div><div class="">\() is consistent with \r \n etc.</div><div class=""><br class=""></div><div class="">And I'm not sure if $ is easier to type. '\' is a single keypress and is located</div><div class="">near Backspace &amp; Enter.</div><div class=""><br class=""></div><div class="">$ is SHIFT+4 and is harder to type without looking at the keyboard.</div><br class=""><div class="">
<div class="">Andrey</div><br class="Apple-interchange-newline">

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 22 Jun 2016, at 02:25, Brandon Knope via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">How can it be unpersuasive? I can *show* you that keys that are easier to type/reach exist for a large majority of user’s.<div class=""><br class=""></div><div class="">I am not saying it is a good idea or not to replace \, but to pretend that there isn’t an inconvenience there is unfair when every other part of the language is put under a magnifying glass for the sake of grammar, newbie friendliness, or this or that, etc...</div><div class=""><br class=""></div><div class="">This is <b class="">measurable</b>…it just depends on whether it bothers people or not enough. Most other things are based on opinion, but this *can* be based on numbers and usability.</div><div class="">This is <b class="">something used by everyone</b>. The usability cost is there and it is real. Just because “well it is easy for me to type” does not mean that it is ideal. It also doesn’t mean that the current choice is the wrong choice either. But it still is important to discuss while we can.</div><div class=""><br class=""></div><div class="">And yes a keyboard IS only so big, but the range to that bigness can be pretty… big.</div><div class=""><br class=""></div><div class="">Also, $ is not the only option. There are still far easier keys to type than \.</div><div class=""><br class=""></div><div class="">Brandon</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 21, 2016, at 7:15 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Tue, Jun 21, 2016 at 6:08 PM, Brandon Knope via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Actually… we can go pretty scientific on this sort of thing and heat map keyboard usage to get a better picture of how “usable” this is.<div class=""><br class=""></div><div class="">I pasted a file that contains seven \’s in it and heat mapped it at&nbsp;<a href="https://www.patrick-wied.at/projects/heatmap-keyboard/" target="_blank" class="">https://www.patrick-wied.at/projects/heatmap-keyboard/</a></div><div class=""><br class=""></div><div class="">Even *with* several \’s throughout my source file the majority of my key presses take place much closer to the $ key than the \ key.</div><div class=""><br class=""></div><div class="">I think we can all argue about what is clearer or not, but I think for the majority of us, the \ key is quite inconvenient compared to the keys around where we type the most.</div><div class=""><br class=""></div><div class="">I also ran several of iOS 10’s sample code through the heat map and continue to get pretty similar results: the \ is much further from the hottest part of the keyboard than the ones closer to where your hand usually rests.</div><div class=""><br class=""></div><div class="">Maybe this is flawed, but I think it is hard to argue that the \ is easy to type when there are far more usable alternatives.</div></div></blockquote><div class=""><br class=""></div><div class="">I'm rather unpersuaded by this line of argument. The keyboard is only so big; it's a stretch to say that any key is less than absolutely usable. Moreover, \ is next the delete key, which I presume you use frequently and find no difficulty in reaching.</div><div class=""><br class=""></div><div class="">You know what *is* unusable though? Try finding the $ key on an international keyboard.</div><div class="">&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Brandon</div><div class=""><div class="h5"><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 21, 2016, at 6:10 PM, Daniel Resnick via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">I also disagree for the same reasons that Gwynne and Brent mentioned: I find '\(...)' easy to read, fine to type, and consistent with other string escaping syntax.<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jun 21, 2016 at 3:55 PM, Brent Royal-Gordon via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; I find that typing \(var) is very disruptive to my typing flow. The more I code in Swift, the more I like it, but every time I'm coding and then have to hiccup while typing \ then ( causes me to be annoyed. I know, it's minor, but it isn't a key combination that flows quickly.<br class="">
&gt;<br class="">
&gt; I would much rather have $() or perhaps ${} (like Groovy lang) or perhaps @() to go along with other uses of @ throughout the language.<br class="">
<br class="">
</span>Even though I'm used to Perl's and Ruby's interpolation syntaxes, I immediately liked `\(…)`. It's parsimonious: Rather than taking a third character (besides \ and ") to mean something special in a string literal, it reuses one of the existing ones. There's no need to escape a character you wouldn't otherwise have to touch, or to think of another character as "magical" in a string. It fits nicely with the rest of the syntax, with `\` indicating a special construct and then `()` delimiting an expression, just as they do elsewhere in the language. It's an elegant solution to a problem traditionally solved inelegantly. It's very Swifty in that way.<br class="">
<span class=""><br class="">
&gt; A shifted key, like $ or @, followed by another shifted key like (, allows for a much faster flow and they are much closer to the home keys than \ which is nearly as far from home keys as possible (and awkward).<br class="">
<br class="">
<br class="">
</span>I don't have any trouble typing it personally. If you find yourself accidentally typing `\9` or `|(`, we could probably offer an error for the former or warning for the latter with a fix-it. But if you're complaining that it takes a tiny fraction of a second longer to type than `$(` would, then honestly, I just can't bring myself to care. Swift optimizes for code reading. If we wanted to optimize for code typing instead, we'd have a very different style.<br class="">
<span class=""><font color="#888888" class=""><br class="">
--<br class="">
Brent Royal-Gordon<br class="">
Architechies<br class="">
</font></span><div class=""><div class=""><br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></div><br class="">_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>