The documentation only mentions nested types, but it\'s not clear if they can be used as namespaces. I haven\'t found any explicit mentioning of namespaces.
Answered by SevenTenEleven in the Apple dev forum:
Namespaces are not per-file; they're per-target (based on the "Product Module Name" build setting). So you'd end up with something like this:
import FrameworkA import FrameworkB FrameworkA.foo()All Swift declarations are considered to be part of some module, so even when you say "
NSLog" (yes, it still exists) you're getting what Swift thinks of as "Foundation.NSLog".
Also Chris Lattner tweeted about namespacing.
Namespacing is implicit in Swift, all classes (etc) are implicitly scoped by the module (Xcode target) they are in. no class prefixes needed
Seems to be very different what I have been thinking.