[swift-users] noob question about modules

blaster_in_black blaster_in_black at protonmail.com
Tue Sep 12 16:40:24 CDT 2017


Hi,

I am beginning with Swift 4 (coming from the Java world) but I do not have yet a Swift development environment to experiment with. Therefore my question(s) might sound a bit silly. Unfortunately, I haven't been able to answer them by reading the online Language Guide.

1) What makes a submodule? I can see online examples about how to import them, but not how to create one or any other further details about them. Are they like Java packages inside a jar? Do their hierarchical name (prefix1.prefix2. ... .submodulename) reflect a path tree on the filesystem (/prefix1/prefix2. ... /submodulename), just as it happens with Java packages?
2) Can two different submodules within a single module export two different classes under a single class name? Like module.submodule1.MyType and module.submodule2.myType.

Thanks in advance.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170912/c5517b78/attachment.html>


More information about the swift-users mailing list