Construction and definition builtins
These facilities are defined in the implicit source unit builtins/eng/core.l. Their source definitions are the authority for composition; their names do not create conventional object-oriented or functional-language semantics beyond the current implementation.
Process
Section titled “Process”Process has forms Process, Processes, Processive, and Processing. Its native definition is operation W integrated with the ordered Definitions/Syllables parameter:
<DEF>W^<@Definitions|Syllables@><DEF>A Process collects existing instantiated definition expressions. It is not an OS process handle; App invocations own those. Processing a source-defined rendering or writing operation in IO is an application-body composition, not a direct runtime launch instruction.
Function
Section titled “Function”Function has forms Function, Functions, Functional, and Functioning. It supplies an FW native definition with Func metadata. Name is Text, Inputs is Props, Outputs is Texts, and Process is an already instantiated definition reference.
Inputs and Outputs preserve their typed cardinality. Main supplies No Inputs and No Outputs; ordinary Function declarations bind their checked signatures and paragraph bodies to the same selected definition. The constructor is not a marker for a second emitter.
Invocation words use normal grammatical binding, as Print does. Captures, snapshots and Pointer sharing follow scope rules. Native signature/lifetime metadata remains bounded by the definition contract.
Function.Return
Section titled “Function.Return”Return, Returns, Returned, Returning, and Returner are Function members. A Function body resolves Return to its selected member definition and checks the declared result types and counts. Native composition determines the return context.
Return completes that invocation; Exit terminates the enclosing program. Neither transports runtime captures into an App process.
Objective
Section titled “Objective”Objective describes any Function by wrapping its existing definition in a grouped native source word containing A and the Function. It preserves the input definition and grouping; it does not clone its runtime semantics or infer additional function arguments.
Main is a New Adjective describing Service, Object, or Function. Its ordered refinements compose:
| Target | Builtin construction |
|---|---|
| Function | Generic main Function of a Process, with No Inputs and No Outputs |
| Object | Generic main Object with a New Objective Main Function using a Process |
| Service | Generic main Service with a New Main Object using a Process |
These are ordinary source-defined descriptor rules. Aliases preserve their identity, and each construction selects the rule matching its target type.
Main does not grant standalone Service execution. A standalone declaration is structural; standalone Service body effects and native process operations reject. Apps own executable identity through their construction.
Basic describes a Generic App with a New Main Service using a Process. It is the composition behind Create "Hello" as a New Basic App. The App's source actions supply its body; the orchestrator separately controls launch and output.
Failures and visibility
Section titled “Failures and visibility”Descriptor target mismatch, a missing constructor rule, recursive descriptor expansion, malformed slots, unsupported signatures, and inaccessible captures reject at their respective semantic boundaries. Aliases preserve canonical descriptor identity. Public/Publicly controls publication independently of New/Generic construction.
Static references retain definition-site bindings. Runtime captures retain their declaration activation: ordinary values snapshot and explicit Pointer targets share. Caller shadowing does not select another environment.
Sources and witnesses
Section titled “Sources and witnesses”Sources: core source, descriptors, construction, and native definition interface. Witnesses: construction, definitions, descriptor identity, capture, and Service boundary tests.
Canonical source: docs/reference/builtins/definitions.md.