<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class=""><br class=""></div><div class="">I have a question re the nil coalescing operator. Shouldn’t </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(165, 191, 142);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bf626b" class="">print</span><span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class=""> (</span>"This machine's ip is <span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class="">\</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class="">result</span><span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class="">[</span>"ip"<span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class="">] ?? </span>“unknown")”<span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class="">) </span></div></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(165, 191, 142);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c0c5cf" class=""><br class=""></span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(165, 191, 142);" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">return </span><b style="color: rgb(99, 114, 125); font-size: 11px;" class="">This machine's ip is 78.97.202.31 </b><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">? Since the value is always String, not String?. However, it still surrounds the ip with Optional(). </span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(165, 191, 142);" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class="">So I’m using, <span style="color: rgb(192, 197, 207); font-family: Menlo; font-size: 14px;" class="">(result.</span><span style="font-family: Menlo; font-size: 14px; color: rgb(209, 135, 113);" class="">0</span><span style="color: rgb(192, 197, 207); font-family: Menlo; font-size: 14px;" class="">[</span><span style="font-family: Menlo; font-size: 14px; color: rgb(165, 191, 142);" class="">"ip"</span><span style="color: rgb(192, 197, 207); font-family: Menlo; font-size: 14px;" class="">] ?? </span><span style="font-family: Menlo; font-size: 14px; color: rgb(165, 191, 142);" class="">"nil"</span><span style="color: rgb(192, 197, 207); font-family: Menlo; font-size: 14px;" class="">).description </span>but is long and dirty. Any thoughts? </div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">Cheers!</div><div style="margin: 0px; line-height: normal;" class="">– V</div></body></html>