default
The default keyword marks a module's default export (the value imported when no specific name is given) and is also used as a fallback branch in some match/switch forms.
Syntax & Example
export default fn main() {
print("entry point");
}
Use Cases
- Designating a module's primary export.
- Providing a fallback case in pattern matching or switch-like constructs.
- Pairing with
exportto define a single, prominent module member.