Content deleted Content added
Ira Leviton (talk | contribs) m Replaced outdated html codes with wikicodes. |
Jerryobject (talk | contribs) m WP:LINKs: update-standardizes, needless WP:PIPE > WP:NOPIPE. Cut needless carriage return in paragraph. |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Short description|Matching of lexical tokens to the components of a computer program}}
{{see also|Name resolution (computer systems)}}
In [[programming language]]s, '''name resolution''' is the resolution of the [[lexical analysis|token]]s within program expressions to the intended program components.
Line 29 ⟶ 30:
</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|
Examples of languages that use static name resolution include [[C (programming language)|C]], [[C++]], [[E (programming language)|E]], [[Erlang (programming language)|Erlang]], [[
==Name masking==
Line 57 ⟶ 58:
==Alpha renaming to make name resolution trivial==
In programming languages with [[lexical scoping]] that do not [[
For example, in this code:
Line 76:
}
</syntaxhighlight>
within the {{mono|Point}} constructor, the [[
<syntaxhighlight lang="cpp">
class Point {
|