No verb can take a BASIC function, and nothing resolves a bare word to one #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md §6 item 40 (at
9151438)The C half is done:
akbasic_runtime_call_function()splits argument binding out of call-sitehandling, so a verb can call a BASIC function with values it already has.
What is still not done is the language half: no verb takes a function yet, and nothing resolves
a bare word to a function rather than to a label. That wants
akbasic_environment_get_function()and the precedent ofCOLLISION 1, BUMPEDtaking a bare wordby name (
src/runtime_sprite.c) -- and a verb that actually needs it, rather than being built onspeculation.
It was rejected for the collision query on the use case rather than on feasibility: the motivating
program wants one answer rather than many, a loop is the idiomatic form in this dialect, and the
language already has a callback shaped the way a BASIC programmer expects -- an interrupt handler
taking a label.
One hazard, if it is ever wired to a collision query. Do not pass the BASIC function through as
an
akgl_CollisionVisitFunc: it would run inside the partitioner's cell-chain walk, and thecallback a brick loop wants removes the brick it was just told about, which is
partitioner.remove()rewriting the chain the walk holds a cursor into. Collect the candidatesduring the walk, close the walk, then dispatch.
Bounded by the REPL limitation on multi-line
DEFbodies: a multi-line body runs only while aprogram is running, which is the case a verb is in and not the case a host with a stopped runtime
is in.
Files:
src/runtime.c,src/environment.c,src/runtime_sprite.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)