The addressed module system is Black Hole, that you have a brief introduction and download URL to on http://mwaza.dyndns.org/apps/files/bh-tutorial.html http://mwaza.dyndns.org/apps/files/bh-tutorial.html .
Email me any feedback and questions you have on the introduction. More documentation is underway, and will be published in approx a month.
The module system does macro export automatically, and dependency loading and compilation. The documentation will describe this clearly.
Mikael
2009/4/30 Valeriya Pudova val1969@neotech.lv
Hello good people,
| --- "A Tour of Scheme in Gambit.pdf" | In Gambit, a good way to subdivide code is by using the X module system. | The layout is pretty straight-forward: | create a .scm-file . Start it with (module name) where name is the name. | Then, declare what other modules to use with the (use) procedure. For instance: | (use lib/srfi1 lib/http-client)
Is it true?
I see, the Gambit has two methods: 'include' and 'load' First method 'include' lets subdivide app into files. It can be helpful but it is pure method (similar to include of C language). Programmer should avoid recursively included files, etc. For me 'include' is not good way how to code app.
The method 'load' lets subdivide app into the modules. This should be better that 'include' (for me). But it has limitation. The macro definition usable only at one file.
|--- manual: | To have access to the macro definitions contained in | a file, that file must be included using the include special form.
Maybe that is why the statistic of using 'include' is higher that for 'load' method. Also i seen at the source files list of the "Space Invaders classical arcade game" that programmer split modules into 2 files one is for code and second for macros, and last one must be included when first can be loaded.
Does not look like pretty. Fix me if I am wrong please.
What is correct template how to subdivide app into modules? Maybe there is lightweight module system library exists? _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Afficher les réponses par date