Gauche:ModuleSystemGauche has a first class module (namespace), and requre/provide-based library management mechanism. Both are extension of the mechanisms of STk. On top of them there's a convenience macro (use) that is similar to Perl's use or Python's import. NamespacesA module can be created declaratively (define-module), or procedurally (make-module?). A module is basically just a global symbol table. It also keeps the visibility control information. Global bindings can be made visible from other modules by export and export-all syntax. The user of the module can import such bindings by import syntax. Advanced features such as renaming import or selective import are not supported (yet). Besides using other modules by import, a module can inherit other modules, to extend the original modules (extend?). A module can inherit from multiple modules, exactly like Gauche's class can inherit from multiple classes. LibrariesA basic require/provide mechanism is used to manage loading library files. It is orthogonal to module systems. Use formA special form use just combines require and import for convenience. (use srfi-1) ;; loads library "srfi-1" and imports module srfi-1 | About This SiteHome Alphabetical Indexa b c d e f g h i j k l m n o p q r s t u v w x y z other ConceptsConcept:CaseSensitivity Concept:DocumentationFormat Concept:ExtendedLambdaList Concept:FileSystem Concept:FindAndAnyInCollection Concept:ForeignInterface Concept:HashTable Concept:Module Concept:Networking Concept:ObjectSystem Concept:Process Concept:RegularExpression Concept:UserGroup Implementations
External Links |