<div dir="ltr"><div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">Hi All:<div><br></div><div>Current bridging from Objective-C to Swift has this behaviour:</div><div><br></div><div><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">If we define a property in Objective-C, and we don’t say it is nullable or nonnull, like this: @property <span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">(</span>nonatomic<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">,</span> strong<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">,</span> readonly<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">)</span> NSString *someString<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">;</span><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51);min-height:16px"><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">When we reference it from Swift<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">,</span> this property will be bridging to<b> String!</b> (<em style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;margin:0px;outline:0px;padding:0px;vertical-align:baseline;color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif">implicitly unwrapped optional</em>) type automatically<span style="line-height:normal;font-family:&quot;.PingFang SC&quot;">,</span> and <b>there is no warning indicate we should check if this is nil first.</b></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)"><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">So the result is when some edge cases happen, the App will crash.</p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)"><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">As more and more large projects are trying to use Swift now, this may seems a problem for more people.</p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)"><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">The documents I can find is: <a href="https://developer.apple.com/swift/blog/?id=25" target="_blank" style="font-family:-apple-system,sans-serif">https://developer.apple.<wbr>com/swift/blog/?id=25</a> and <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html" target="_blank" style="font-family:-apple-system,sans-serif">http<wbr>s://developer.apple.com/<wbr>library/content/documentation/<wbr>Swift/Conceptual/<wbr>BuildingCocoaApps/<wbr>InteractingWithObjective-<wbr>CAPIs.html</a>, it says “<span style="color:rgb(65,65,65);font-family:Helvetica,Arial,sans-serif">Swift cannot distinguish between optional and nonoptional references, and imports it as an implicitly unwrapped optional.</span>”<br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)"><br></p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51)">As in Objective-C, the default property is nullable(if you don’t say it is nonnull), I am curious what’s the reason that the property is not bridging to optional, for me, feel optional value should be a better fit here.</p><p style="margin:0px;line-height:normal;font-family:&quot;Helvetica Neue&quot;;color:rgb(51,51,51);min-height:16px"><br></p><p style="margin:0px;line-height:normal;min-height:16px"><font face="Helvetica Neue"><font color="#333333">Anyone know what’s the consideration at Swift 2 when this change happens?</font></font></p></div></div><div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br><div>Regards,</div>olddonkey</div></div>