Module Constant
A module constnat is permanently bound to a specific value. A module constant has module scope. The extent of a module constant will generally outlast its scope, since a module constant will typically be closed into a method definition. Module constants are visible to all lexically subsequent expressions, i.e., expressions occurring after the module constant definition in the source module.
Grammar:
References:
- A brief discussion of the design decisions behind being unable to export module constants via the 'introduced names' section of a module
- A discussion and definition of module constants, with a code example, in the Module Bodies documentation
- Module constants in the guess-the-number tutorial
- A module constant used in the Hilbert Hotel tutorial