Liste des Groupes | Revenir à cl c |
On 02/12/2024 21:06, David Brown wrote:On 02/12/2024 19:27, Bart wrote:On 02/12/2024 15:24, David Brown wrote:On 02/12/2024 13:24, Bart wrote:>I would consider any kind of automatic import system to be a bad idea.>
It's not automatic; you have to list the modules. If you don't want
data shared, then don't export it!
>
As I understood it, or perhaps failed to understand it (after all, it's
not as if there are published specifications, references,
https://github.com/sal55/langs/blob/master/Modules24.md
(A summary, mainly for my benefit, about a year old.)
tutorials or
examples for your language)
I gave an example in my post, of the lead module for my C compiler.
Older examples are in that link.
In all (counting the 'pcl' backend library) it comprises 36 source files
in two folders; plus about 40 C headers in two folders, which are
embedded into the executable.
This information is enough for the compiler, and nothing else, to locate
all the necessary files and to build an EXE file.
you would list your modules for a program
in one place, and then other modules in the program automatically import
them all.
The logic used in the name resolution pass of the compiler allows
visibiliy without needing full name-qualifying.
I can rename any module, and I only need to change the one file. I can
move an exported function from one module to another, without making any
other changes (eg. change all xxx.F() to yyy.F()).
Les messages affichés proviennent d'usenet.