<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">In Ruby they have special literals, like so:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">So this would be an array of chars</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">%c{a b c d e f g}</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">
<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Head of Trolls</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 11 July 2016 at 05:56, Saagar Jha via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:'SFUIText-Regular','SF UI Text';font-size:12pt;color:rgba(0,0,0,1.0)"><div style="word-wrap:break-word">Yes, but then a similar complaint could be made that I <i>wanted</i> a String this time. The only real way to tell the difference is to use something like single quotes.<div><div class="h5"><div><br><div><blockquote type="cite"><div>On Jul 10, 2016, at 14:03, Rick Mann via swift-users <<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:</div><br><div><div><br><blockquote type="cite">On Jul 10, 2016, at 11:44 , Saagar Jha via swift-users <<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:<br><br>Well, what if you wanted to create a String with one character? There’s no way to differentiate.<br></blockquote><br>That hardly seems like the justification. In that case, you'd specify the type:<br><br> let s: String = '\n'<br><br><br><blockquote type="cite"><br><blockquote type="cite">On Jul 7, 2016, at 02:35, 王 黎明 via swift-users [<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>](<a href="mailto:swift-users@swift.org" target="_blank">mailto:swift-users@swift.org</a>) wrote: ><br></blockquote><br>In Swift, we must specify the type for Character variables(because there’s no Character literals):<br><br>let eol: Character = “\n”<br><br>it's not a big problem, but, Is it the unique case that can’t use type infer?<br><br>swift-users mailing list <a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a> <a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br><br>-- <br>-Saagar Jha<br>_______________________________________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br></blockquote><br><br>-- <br>Rick Mann<br><a href="mailto:rmann@latencyzero.com" target="_blank">rmann@latencyzero.com</a><br><br><br>_______________________________________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br></div></div></blockquote></div><br></div></div></div></div></div></div>
<br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>