Tuesday, November 19, 2013

"Lexical typing" and "static scope"

In "lexical scope", the correspondence between names in code and variables in memory depends on the lexical structure of the code (which parts enclose which). In "dynamic scope", it depends on the dynamic structure of the running program (which parts are calling which)

In "static typing", the correspondence between variable names and variable types depends on the lexical structure of the code. In "dynamic typing", it depends on the dynamic structure of the program.

"Static" and "lexical" seem to be synonyms. You might as well rename static typing to "lexical typing", or lexical scope to "static scope".

No comments:

Post a Comment