[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Though dynamic scoping has its uses, static scoping is generally preferred in functional languages, because it permits natural definition of first-class operators, and because it is easier to compile efficient code.
Lexical scoping means that name binding and deciding if closures are needed must be done before evaluation. Because we want to support mutual recursion without forward declarations, this step must be a separate pass, after parsing and before evaluation. This pass, which we call the name binding pass, is also when macro expansion is done.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |