Note: If any more acceptances or reviews show up today or tomorrow, I’ll be updating this post rather than creating a new one.
Accepted Proposals
SE-0053 Remove explicit use of let from Function Parameters got rid of a single case that prevented SE-0001 from being implemented without exceptions. It’s a bookkeeping kind of proposal but one that simplifies and cleans up Swift.
SE-0016 Adding initializers to Int and UInt to convert from UnsafePointer and UnsafeMutablePointer means you won’t have to write all your pointer arithmetic in C: “Just as users can create Unsafe[Mutable]Pointer
s from Int
s and UInt
s, they should be able to create Ints and UInts from Unsafe[Mutable]Pointer
s. This will allow users to call C functions with intptr_t
and uintptr_t
parameters, and will allow users to perform more advanced pointer arithmetic than is allowed by UnsafePointer
s.”
SE-0054 Abolish ImplicitlyUnwrappedOptional (IUO) type was accepted pending user experience, or as I like to call it, “Swift try before Swift buy“. The idea is that IUO moves from the type system to declaration attribute. “The appearance of !
at the end of a property or variable declaration’s type no longer indicates that the declaration has IUO type; rather, it indicates that (1) the declaration has optional type, and (2) the declaration has an attribute indicating that its value may be implicitly forced.”
SE-0055: Make unsafe pointer nullability explicit using Optional. “Today, UnsafePointer and friends suffer from a problem inherited from C: every pointer value could potentially be null, and code that works with pointers may or may not expect this. Failing to take the null pointer case into account can lead to assertion failures or crashes. This proposal makes UnsafePointer<Int>
represent a non-nullable pointer, and UnsafePointer<Int>?
a nullable pointer. This also allows us to preserve information about pointer nullability available in header files for imported C and Objective-C APIs.”
In Review
- March 24…29, 2016 SE-0048: Generic Type Aliases
- March 28…31, 2016 SE-0049: Move @noescape and @autoclosure to be type attributes
- March 31…April 5, 2016 SE-0057: Importing Objective-C Lightweight Generics
- March 31…April 5, 2016 SE-0056: Allow trailing closures in
guard
conditions - March 31…April 5, 2016 SE-0036: Requiring Leading Dot Prefixes for Enum Instance Member Implementations
- March 31…April 5, 2016 SE-0059: Update API Naming Guidelines and Rewrite Set APIs Accordingly
- April 4…11, 2016 SE-0058: Allow Swift types to provide custom Objective-C representations
One Comment
Thanks, I finally understood what SE-0054 (Abolish IUO Type) actually meant! ?