search


Gambit Naming Convention
Mon Jul 19 00:00:00 UTC 2021
Convention Meaning
_foo.scm the underscore prefix indicates that its part of the Gambit runtime library. User files should not start with underscore.
foo_*.c underscore suffix indicates link files generated by Gambit compiler using gsc -link foo.scm
foo#.scm contains the 'compile time' parts of the foo module and foo.scm contains the 'run time' parts So by convention exported macro definitions (and namespace declarations and declare forms) go in foo#.scm and procedure definitions go in foo.scm. This is similar to the C convention of .h and .c file extensions (but that may not help you much if you don’t know C). A file bar.scm that depends on the foo module will do an (include “foo#.scm”) so that it can use the macros defined by the foo module. The files foo.scm and bar.scm get compiled separately and are linked together usin gsc -link ….