ios - How to use Namespaces in Swift? -
the documentation mentions nested types, it's not clear if can used namespaces. haven't found explicit mentioning of namespaces.
answered seventeneleven in apple dev forum:
namespaces not per-file; they're per-target (based on "product module name" build setting). you'd end this:
import frameworka import frameworkb frameworka.foo()
all swift declarations considered part of module, when "
nslog
" (yes, still exists) you're getting swift thinks of "foundation.nslog
".
also chris lattner tweeted namespacing.
namespacing implicit in swift, classes (etc) implicitly scoped module (xcode target) in. no class prefixes needed
seems different have been thinking.
Comments
Post a Comment