Contents Lexical structure Naming conventions Expression Structure RScheme is a language with modules , and modules form the basis of a program's structure. Some modules are required because the runtime system and application environment depend on their presence. Most modules, however, are optional, and are only included when necessary. A module is primarily a name space for variables. A module specifies its interface in the form of its set of exported variables .
Modules also specify which other modules they depend on, or import .
The content of a module is structured as a set of definitions plus a sequence of top-level expressions . Definitions are used to create module variables, while top-level expressions are used to provide code to be executed when the module is loaded . Unlike some interactive language environments, RScheme doesn't interpret the expressions in order to evaluate them. Instead, the expressions are compiled to bytecodes and the compile code is executed by the usual bytecode interpreter. The evaluation of expressions by the REPL is intended to simulate the occurrence of forms in a module.