Next: 4 Style Guide
Up: 3 The Slate World
Previous: 3.13 Types
  Contents
  Index
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 load: 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 from 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 new
- 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.9
- 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.13 Types
  Contents
  Index
The Slate Project
2005-04-11