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.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
Swift uses modules much like in python (see here and here) and as @Kevin Sylvestre suggested you can also use the nested types as namespaces. And to extend the answer from @Daniel A. White, in WWDC they were talking about the modules in swift. Also here is explained:
|
|||
|
I believe this is achieved using:
Then it can be accessed using:
|
|||
|
It was announced in the keynote that it does support namespaces. |
|||||
|