I am interested to know what are the approaches to the organization of modules for programs. What is of interest is how to divide programs into parts and link these parts.
If you refer to any esoteric language that uses an original approach, I will be glad.
I will list what I already know in order not to bother the respondents:
Direct inclusion in the global namespace. When all characters (the names of class functions) are included as is, which strongly trashes the namespace. Languages : C, C ++ (true
namespace
s partially save), PHP, Ruby (Module
s save too), SchemeImport as a module, the ability to explicitly specify the name for the included module (something like alias) and access the characters by that name. Global namespace is not littered. Languages : Java, Python, Haskell, D
In addition, in some languages, you can specify the name of the plug-in in runtime, in others not.
Actually the question is: are there any languages ​​or approaches that do not fall into any of the categories described above? Are there any languages ​​where even these approaches are implemented outside the box?