v3 Semantics
Closures
- nested functions may reference outer scope bindings
- capture is a semantic resolution rule before runtime
Rules
- no redeclare
- const rules
- return inside function
- functions are const bindings
- call arity and callee existence checks (for direct calls)
Dynamic types
- no static type checks
Key checks
- scope walk from innermost to outermost
inFunctionDepthgoverns return legality- direct function declarations are immutable bindings
1 / 1