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
  • inFunctionDepth governs return legality
  • direct function declarations are immutable bindings
1 / 1
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.