</syntaxhighlight>
However, relying on dynamic name resolution in code is discouraged by the Python community.<ref>{{cite web|url=http://mail.python.org/pipermail/python-ideas/2009-May/004582.html|title=<nowiki>[</nowiki>Python-Ideas<nowiki>]</nowiki> str.format utility function|date=9 May 2009|accessdateaccess-date=2011-01-23}}</ref><ref>{{cite web|url=http://diveintopython.org/html_processing/dictionary_based_string_formatting.html|title=8.6. Dictionary-based string formatting|work=diveintopython.org|publisher=Mark Pilgrim|accessdateaccess-date=2011-01-23}}</ref> The feature also may be removed in a later version of Python.<ref>{{cite web |url=https://docs.python.org/3/tutorial/classes.html#python-scopes-and-namespaces|title=9. Classes - Python documentation |quote=It is important to realize that scopes are determined textually: the global scope of a function defined in a module is that module’s namespace, no matter from where or by what alias the function is called. On the other hand, the actual search for names is done dynamically, at run time — however, the language definition is evolving towards static name resolution, at “compile”"compile" time, so don’t rely on dynamic name resolution! (In fact, local variables are already determined statically.)|accessdateaccess-date=2019-07-24}}</ref>
Examples of languages that use static name resolution include [[C (programming language)|C]], [[C++]], [[E (programming language)|E]], [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]], [[Java (programming language)|Java]], [[Pascal (programming language)|Pascal]], [[Scheme (programming language)|Scheme]], and [[Smalltalk]]. Examples of languages that use dynamic name resolution include some [[Lisp (programming language)|Lisp]] dialects, [[Perl]], [[PHP]], [[Python (programming language)|Python]], [[REBOLRebol]], and [[Tcl]].
==Name masking==
==Alpha renaming to make name resolution trivial==
In programming languages with [[lexical scoping]] that do not [[reflectionReflective (computer science)programming|reflect]] over variable names, [[Lambda calculus#.CE.B1-conversion|α-conversion]] (or α-renaming) can be used to make name resolution easy by finding a substitution that makes sure that no variable name [[variable shadowing|masks]] another name in a containing scope. Alpha-renaming can make [[static code analysis]] easier since only the alpha renamer needs to understand the language's scoping rules.
Alpha-renaming can make [[static code analysis]] easier since only the alpha renamer needs to understand the language's scoping rules.
For example, in this code:
}
</syntaxhighlight>
within the {{mono|Point}} constructor, the [[classinstance variable]]s {{mono|x}} and {{mono|y}} are [[Variable shadowing|shadowed]] by local variables of the same name. This might be alpha-renamed to:
<syntaxhighlight lang="cpp">
class Point {
|