global
Updated-- a.aly export local counter = 0 export const LIMIT = 5 export function bump() counter += 1 end
-- b.aly import { counter, LIMIT, bump } from "./a"
global is removed. A declaration that writes the word reports at the word, and the report names the export declaration and the import line that replace it. The quick fix rewrites the one word, and the auto import writes the line in the file that reads the name.
A value several files share is an export local in one module. The module holds the one slot: a write through a function that module exports is the value every file reads back through it. An import binds the value at require time, the way a local does, so a file that must see later writes reads them through a function and not off the imported name. Luau has modules for this, which is why the word left: every feature that reads names across files paid for it, and _G is warned against for the reasons the proposal gives.
The side rules left with it: --@alloy-side, --@alloy-file-side, and the [contexts] table. A .client.aly or .server.aly name still says which half of a remote the file sees.
The word is free as a name: local global = 1 reads the Luau way.
