Hey, happy Monday, none of your Swift code will compile!

Nothing a quick find and replace can’t cure. “Several” protocols have been renamed with the -Type suffix to avoid confusion, say the release notes. “A crapload” may have been a more accurate term but that probably wouldn’t pass Apple QA. Mostly this is a lot clearer – especially with IntegerType , as there were lots of confused beginners wondering why they couldn’t declare an Integer variable.

Unmentioned, but in a similar vein in the opposite direction, various typealiases within protocols have had their Type suffix removed. IndexType , GeneratorType , KeyType , ValueType and SliceType are now just Index , Generator , Key , Value and SubSlice .

This I guess makes up for the extra verbosity of now having to type CollectionType that bugs me a bit, though it will give me a reason to just write “collection” in future articles without always feeling guilty that I haven’t capitalized and monospace-fonted it.

A quick list of small items:

All the operators declared at the top now have visible precedence levels and associativity, which is handy if you are trying to target the precedence of your own operators.

Lots of new operators for strides and intervals.

The weird use of [T] , [K:V] and T? when extending Array , Dictionary and Optional is gone, as has ArrayType .

, and when extending , and is gone, as has . Character is now hashable.

is now hashable. The trend of replacing proxies of C-style things with pointer objects, that started last beta with replacing CString , continues with UnsafeArray and UnsafeMutableArray becoming UnsafeBufferPointer and UnsafeMutableBufferPointer .

, continues with and becoming and . The law finally caught up with Array and made it mark its various mutable methods as mutable. Same for ContiguousArray and Slice .

and made it mark its various mutable methods as mutable. Same for and . Various integer types have had the getArrayBoundValue function changed to an arrayBoundValue get property.

function changed to an get property. String now has inits that take integers. You can also supply a radix, as well as whether you want digits above 9 to be in upper or lower case.

now has inits that take integers. You can also supply a radix, as well as whether you want digits above 9 to be in upper or lower case. In addition to Array acquiring first and last , the lazy collections also implement first (and last if they can index bidirectionally), as well as isEmpty .

acquiring and , the lazy collections also implement (and if they can index bidirectionally), as well as . There’s also a non-member first and isEmpty that takes a collection, and a last that takes a collection if it has a bidirectional iterator.

and that takes a collection, and a that takes a collection if it has a bidirectional iterator. Optional now has a hasValue property instead of a getLogicValue() function.

now has a property instead of a function. String.compare is gone.

is gone. UInt and family’s asSigned() has gone. Instead, use numericCast which appears to have been revamped a bit to do more at compile time.

and family’s has gone. Instead, use which appears to have been revamped a bit to do more at compile time. UInt now has a bitwise initializer from its signed equivalent, which you need to explicitly call with a bitPattern: argument.

now has a bitwise initializer from its signed equivalent, which you need to explicitly call with a argument. Relatedly, reinterpretCast has been renamed unsafeBitCast . You have been warned.

has been renamed . You have been warned. New prefix and suffix functions take a Sliceable and return the start or end of it as a slice.

and functions take a and return the start or end of it as a slice. You can no longer access the underlying sequences of a Zip2 sequence.

sequence. There’s now a version of assert that takes a BooleanType expression, not just a bool.

that takes a expression, not just a bool. The comment descriptions for sort now have a helpful link to wikipedia about strict weak ordering!

now have a helpful link to wikipedia about strict weak ordering! The function passed to withExtendedLifetime actually takes x as an argument now.

Poor old Range has been thoroughly demoted. One minute it’s on top of the world, then last time stride takes its spot for non-contiguous increments. Now ClosedInterval and HalfOpenInterval replace it for general purpose ranges. They also follow the pattern adopted by StrideTo and StrideThrough of having completely different types for the two kinds, determined at compile time. They require their initializing values to conform to ComparableType , which means they can detect if they are inverted and can efficiently detect overlap between two intervals.

Range is now relegated entirely to managing collection indices. The odd thing about this is that Int , probably the most common thing to use to initialize a range, is also an index type, so Range still gets to come out and play all the time.

By the way, I love how the definitions of StrideTo and StrideThrough have a FIXME in their comments about how they ought to be collections.