<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 4, 2016, at 12:28 AM, Paul Ossenbruggen via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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=""><div class=""><b class="">Draft Proposal feedback welcome.</b></div><div class=""><b class=""><br class=""></b></div><div class=""><b class="">## Introduction</b></div><div class=""><br class=""></div>Currently to make a optional from a value the type name must be repeated:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let x = “Some Value”</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let y : String? = x</div><div class=""><br class=""></div><div class="">This takes away some of the advantage of type inference because the very next line I must specify the type.</div><div class=""><br class=""></div><div class=""><b class="">## Proposal</b></div><div class=""><br class=""></div><div class="">I propose the following syntax:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let y? = x</div></div></div></blockquote><div><br class=""></div><div>This syntax already means something in Swift (though in this context it is illegal): "a?” is a pattern that binds to the inside of an optional. It actually does the opposite of what you propose: it binds “a” to the thing inside an optional, which is the opposite of what you want.</div><div><br class=""></div><div>As others have pointed out, using "Optional(x)” works today in an arbitrary expression position.</div><div><br class=""></div><div>-Chris</div></div></body></html>