Sent from my iPhone

> On 2015/04/25, at 23:59, William Squires <wsqui...@satx.rr.com> wrote:
> 
> Okay, I still don't get why Swift has this stupid ! and ? syntax. Why not 
> just:
> 
> 1) Explicitly state that object references must be tested for nil before use 
> (like C,C++, etc...), or
This is what that means. 
> 2) Use the ObjC behavior
It's a different language. One that aims for building a safe world. But it also 
lets you be unsafe but you have to "know what you're doing" or at least say so 
to Swift. 

This tension is simply part of life when using objects that inherit from 
NSObject and when interfacing with C libraries where paradigms are different. 

Swift 1.2 begins to address this with corresponding additions to Objective-C in 
the form of Nullability decorations. Make sure you update Xcode for the latest. 
Also be wary of code on the web and in books as it can be outdated quickly with 
any new language. 

Scripting languages are worse in this regard. Where frameworks change faster 
than documentation. 
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to