[swift-evolution] [Accepted, pending implementation] SE-0054: Abolish ImplicitlyUnwrappedOptional type
Dave Abrahams
dabrahams at apple.com
Thu Apr 21 19:15:48 CDT 2016
on Thu Apr 21 2016, Chris Willmore <swift-evolution at swift.org> wrote:
> I evaluated the effects of this proposal on five projects written in Swift
> against Foundation and other well-audited OS X and iOS Objective-C APIs. The
> only changes that had to be made were the result of Objective-C API in the
> project itself that had not yet been annotated with nullability information. In
> addition, it ended up revealing a programming error in one project where a
> property had been unintentionally inferred to have IUO type. I presented these
> results at the Swift core team review meeting.
>
> Jordan Rose expressed some concern that this sampling of projects didn’t really
> say anything about the effect of these changes on projects that depend on
> unaudited API, especially the Linux case. So I investigated the effect of this
> proposal on building swiftpm, which makes extensive use of POSIX C API. It ended
> up requiring ten new uses of the ! operator (out of 14k lines of Swift) to get
> building again; they were all return values from C API (ctime_r, getcwd, getenv,
> strerror, realpath) that had been saved to intermediate variables. Jordan
> observes that most of the cases are better expressed with “if let” or “guard
> let” statements anyway.
>
> We have concluded that we should move forward with implementing the
> proposal.
NICE!
--
Dave
More information about the swift-evolution
mailing list