foolang
foolang copied to clipboard
syntax-change: remove `return`
Replace return x
with x!
-- consistent with using !
to terminate definitions.
Implementation plan: set precedence so that !
is consumed by sequence parsing, and wraps the prefix in a return. Allow returning from define, allowing guard clauses in defines.
define MyDef
OtherDef > MagicValue
ifTrue: { 0! }
...
computedMagicValue!
Especially useful once main module is able to pass static assets to imported modules.