<div dir="ltr">&gt;google for swift print optional stackoverflow. I think that kind of speaks for itself.<div><br><div dir="ltr"><div>I think this is actually an example of why the current behavior is a <i>good</i> thing. I did just google that and the top comment of the first result explains what an optional is. That is very good and encourages beginners to understand how optionals work under the hood. If you hide that from them, they will only be even more confused when they see just the string &quot;nil&quot; pop up when it previously was showing the correct value.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, May 19, 2016 at 9:36 PM Krystof Vasa via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">BTW - google for swift print optional stackoverflow. I think that kind of speaks for itself.<br>
<br>
&gt; On May 19, 2016, at 6:07 PM, Jeremy Pereira via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; -1<br>
&gt;<br>
&gt; This seems to me like crippling string interpolation just because sometimes we make mistakes. 99% of the time, if I interpolate an optional, it’s because I want it that way. I don’t want to have to put up with a warning or write the same boilerplate 99% of the time just to flag up the 1% more easily. Sorry.<br>
&gt;<br>
&gt;&gt; On 18 May 2016, at 19:50, Krystof Vasa via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; The string interpolation is one of the strong sides of Swift, but also one of its weaknesses.<br>
&gt;&gt;<br>
&gt;&gt; It has happened to me more than once that I&#39;ve used the interpolation with an optional by mistake and the result is then far from the expected result.<br>
&gt;&gt;<br>
&gt;&gt; This happened mostly before Swift 2.0&#39;s guard expression, but has happened since as well.<br>
&gt;&gt;<br>
&gt;&gt; The user will seldomly want to really get the output &quot;Optional(something)&quot;, but is almost always expecting just &quot;something&quot;. I believe this should be addressed by a warning to force the user to check the expression to prevent unwanted results. If you indeed want the output of an optional, it&#39;s almost always better to use the ?? operator and supply a null value placeholder, e.g. &quot;\(myOptional ?? &quot;&lt;&lt;none&gt;&gt;&quot;)&quot;, or use myOptional.debugDescription - which is a valid expression that will always return a non-optional value to force the current behavior.<br>
&gt;&gt;<br>
&gt;&gt; Krystof<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; swift-evolution mailing list<br>
&gt;&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt;&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div></div></div><div dir="ltr">-- <br></div><div><div dir="ltr"><div><div>Dan Appel<br></div></div></div></div>