Namespacing is implicit in swift, all classes (etc) are implicitly scoped by the module (Xcode target) they are in. no class prefixes needed – Chris Lattner
The framework name is the namespace.
When importing a framework types can be accessed implicitly or explicitly.
Fun with namespaces
A framework FrameworkA that defines a public type Thing.
An app MyApp that imports FrameworkA.
The two variables have the same type.
What is the type of t?
What if MyApp also imports a FrameworkB that also defines a public type Thing?
We get a nice error.
Solution: use fully qualified names.
t is of type MyApp.Thing.
What if FrameworkB also defines a public type named…
Workaround: define a typealias somewhere else in MyApp.
Limit the scope* of types whenever possible.
Even more so for public types.
Don’t define a type named like the framework (Haneke oops!).