Arrays, dictionaries, and sets

Swift offers a comprehensive set of collection types, as one would expect. In common with many other languages, each of these collection types will only hold values of the same type. Thus, the type of an Array of Int values is distinct from the type of an Array of Float values, for example. If you're coming from Objective C, you may quickly come to appreciate the type safety and simplicity of Swift Array objects over NSArray.

There are no separate mutable and immutable collection types, as such, since all objects in Swift can be declared with either var or let.