February 10, 2015

Major content update for Swift 1.2

Big changes afoot in this release! To wit, a high-level look at what’s in and what’s out:


  • A new collection type, Set, joins Array and Dictionary, bringing along with it SetIndex and SetGenerator.
  • We bid adieu to HeapBuffer, HeapBufferStorage, and OnHeap, while welcoming ManagedBuffer, ManagedBufferPointer, and ManagedProtoBuffer. ♫ Make new friends, but keep the ooooold…
  • Process has changed from a global variable to an enum with static properties, clearing out the only globally scoped variables.
  • NonObjectiveCBase comes on board to help with uniquely identifying instances of reference types.
  • String has had some reorganizing, with String.UTF16View losing Int subscripting as it gets its own Index.


  • Most of the action in protocol additions/removals/renamings has been in the underscore-prefixed, stdlib-internal, unsupported group of protocols. In general, _SwiftNS* lose the Swift and *RequiredOverridesType map to *CoreType.
  • Several other _* protocols are now visible: _ArrayType, __ArrayType, _DestructorSafeContainer, _PointerType, _StringElementType, and, coming to CBS this fall, the mysterious new action drama _ShadowProtocol.


  • countElements is now simply count, which count("countElements") - count("count") tells us is a savings of eight letters.
  • isUniquelyReferenced and isUniquelyReferencedNonObjC have been brought up from the internal stdlb, making it possible to implement third-party copy-on-write behavior.
  • zip provides functional access to the Zip2 type.

Updated to Swift version 1.2 (swift-602.0.37.3).