<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I do not believe I have enough language inside to actually propose a solution. Still I would like to show what I think is the most simplest and flexible way to create modules.</div><div class=""><br class=""></div><div class="">Introduce the ‘module’ keyword to define a module.</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">module <MyModule></font></div></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class="">To create an empty lexical module named “MyModule”:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">module MyModule</font></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">To create content for the module define types/functions/variables/protocols etc using the module name with a dot notation:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">var MyModule.myVar: Int</font></div><div class=""><br class=""></div><div class="">Defines a variable at the module level that can be referred to by “myVar” inside the module, and by “MyModule.myVar” outside the module.</div><div class="">Same for functions, classes, protocols etc.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">To create a submodule:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">module MyModule.SubModule</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">To create a sub-sub module:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">module SubModule.SubSubModule</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If no module definition is present, the default module name is the name of the project.</div><div class=""><br class=""></div><div class="">Defining a module with the same name as the project is allowed, but does not create a new module, it simply refers to the default module.</div><div class=""><br class=""></div><div class="">Visibility (access) is created by:</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">import <moduleName></font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Access level (capability) must be defined by other means (preferably the mechanism proposed by Matthew)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,<br class="">Rien<br class=""><br class="">Site: <a href="http://balancingrock.nl" class="">http://balancingrock.nl</a><br class="">Blog: <a href="http://swiftrien.blogspot.com" class="">http://swiftrien.blogspot.com</a><br class="">Github: <a href="http://github.com/Balancingrock" class="">http://github.com/Balancingrock</a><br class="">Project: <a href="http://swiftfire.nl" class="">http://swiftfire.nl</a><br class=""><br class=""><br class=""><br class=""><br class=""></div><br class=""></body></html>