<div>For the record, I will paste here the answer I have received on StackOverflow. It adds some useful tips to the info provided by Alex. In short,<br></div><div><br></div><div>Swift modules are somehow equivalent to Java packages, and Swift frameworks to Java .jars (if we don't get too formal);<br>Swift (sub)modules can be visible to clients and the latter can import them much as Java sub-packages are imported;</div><div>Swift (sub)modules are not implicitely defined by the source code folders layout, but by meta-files and tooling that are external to the source code (contrarily to Java).<br></div><div><br></div><div><a href="https://stackoverflow.com/questions/46228517/swift-submodules-what-are-they-exactly">https://stackoverflow.com/questions/46228517/swift-submodules-what-are-they-exactly</a><br></div><div><br></div><div>Cheers,<br></div><div><br></div><div>David</div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com">ProtonMail</a> Secure Email.<br></div></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div>-------- Original Message --------<br></div><div>Subject: Re: [swift-users] noob question about modules<br></div><div>Local Time: 14 September 2017 12:26 PM<br></div><div>UTC Time: 14 September 2017 10:26<br></div><div>From: swift-users@swift.org<br></div><div>To: alblue@apple.com<br></div><div>swift-users@swift.org<br></div><div><br></div><div>Thanks much, Alex.<br></div><div><br></div><div>But how do you physically partition the namespace within a module, if not by sub-folders?<br></div><div><br></div><div>I am not sure whether the following example is, by definition, of a submodule that one could import by writing "import Cacao.StyleKit":<br></div><div><br></div><div>Https://github.com/PureSwift/Cacao/tree/master/Sources/Cacao/StyleKit<br></div><div><br></div><div>Sent from ProtonMail mobile<br></div><div><br></div><div><br></div><div><br></div><div>-------- Original Message --------<br></div><div>On 13.09.2017, 10:23, Alex Blewitt &lt; alblue@apple.com&gt; wrote:<br></div><blockquote class="protonmail_quote"><div><br></div><div>No, submodules in Swift bear little relation to sub packages in Java. It's really just a way of partitioning the namespace within a single module. Nor is there any relation between the path and the name of the module either.<br></div><div class=""><br></div><div class=""><div>Alex <br></div><div> <br></div><div><div><br></div><blockquote class="" type="cite"><div class="">On 12 Sep 2017, at 22:41, blaster_in_black via swift-users &lt; <a class="" href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br></div><div><br></div><div class=""><div class="">Hi, <br></div><div class=""><br></div><div class="">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. <br></div><div class=""><br></div><div class="">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 ( <b class="">prefix1.prefix2. ... .submodulename</b>) reflect a path tree on the filesystem (/ <b class="">prefix1/prefix2. ... /submodulename</b>), just as it happens with Java packages? <br></div><div class="">2) Can two different submodules within a single module export two different classes under a single class name? Like <b class=""> module.submodule1.MyType</b> and <b class="">module.submodule2.myType</b>. <br></div><div class=""><br></div><div class="">Thanks in advance. <br></div><div class=""><br></div><div class="">David <br></div><div class=""><br></div><div>_______________________________________________ <br></div><div>swift-users mailing list <br></div><div> <a class="" href="mailto:swift-users@swift.org">swift-users@swift.org</a> <br></div><div>https://lists.swift.org/mailman/listinfo/swift-users <br></div></div></blockquote></div></div></blockquote></blockquote><div><br></div>