Modules split Pilang programs into reusable files and libraries. A module can be
a user-written .pi file or a built-in module provided by the runtime.
Importing a module loads it once, caches it, and exposes its public symbols through a module object or through selected local names.
import mathloads a module and binds it to a name.import math, randomimports multiple modules with oneimportkeyword.import math.{floor, ceil}imports selected exports.import math.{floor:f}imports an export with an alias.import math:mt.{cos, sin}importsmathasmtand selected exports.import math.*imports all public exports into the current module/global scope.- Top-level names in a user module are exported automatically.
- Names beginning with
_are private and cannot be imported from outside.
Imported module objects expose metadata fields such as name, path,
is_main, and exports.