Next: 4 Style Guide
Up: 3 The Slate World
Previous: 3.11 Types
  Contents
Subsections
A simple module system is provided, designed to capture the bare essentials
of a collection of coherent code. The current module system is just
associated with each library file for simplicity's sake. The methods
provides: and requires: applied to the context will
add to and check against a global features sequence respectively,
and missing requirements are noted as the code is loaded. Again for
simplicity, features currently contains and expects Symbols.
The primitive fileIn method also invokes a hook to set the
currentModule in its context.
- Module
- a group of objects and methods, along with some
information about their definitions. Modules can also provide privacy
boundaries, restricting certain methods' accessibility outside of
the module.
- FileModule
- a module that has been built from source code,
presumably in a file.
- System
- a collection of modules that together provide some
larger service. Systems notably support operations on them to control
large-scale libraries.
- Module newEmpty
- creates a new Module with no
contents.
- Module newForFileNamed:
- creates a new FileModule
for the given file name.
- load
- loads the module or system.
- build
- (re-)builds the module or system.
- provide:
- adds the element to the module's provision collection.
- provides:
- declares a collection's elements to be provided
by the current module.
- requires:
- declares a collection's elements to be required
by the current context. If any are not found, an error is raised.4
- import:from:
- adds an element to the import collection of
the current module from the other one's provisions. If it's not provided
by the other module, an error is raised.
- importAll:from:
- adds a collection's elements to the import
collection of the current module from the other one's provisions.
If it's not provided by the other module, an error is raised.
Next: 4 Style Guide
Up: 3 The Slate World
Previous: 3.11 Types
  Contents
The Slate Project
2003-12-05