Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Scope (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Related concepts === In [[object-oriented programming]], [[dynamic dispatch]] selects an object [[Method (computer programming)|method]] at runtime, though whether the actual name binding is done at compile time or run time depends on the language. De facto dynamic scope is common in [[Macro (computer science)|macro languages]], which do not directly do name resolution, but instead expand in place. Some programming frameworks like [[AngularJS#Scope|AngularJS]] use the term "scope" to mean something entirely different than how it is used in this article. In those frameworks, the scope is just an object of the programming language that they use ([[JavaScript]] in case of AngularJS) that is used in certain ways by the framework to emulate dynamic scope in a language that uses lexical scope for its variables. Those [[AngularJS#Scope|AngularJS scopes]] can themselves be in context or not in context (using the usual meaning of the term) in any given part of the program, following the usual rules of variable scope of the language like any other object, and using their own [[Inheritance (object-oriented programming)|inheritance]] and [[transclusion]] rules. In the context of AngularJS, sometimes the term "$scope" (with a dollar sign) is used to avoid confusion, but using the dollar sign in variable names is often discouraged by the style guides.<ref name="js-conventions">{{cite web|url=https://docs.angularjs.org/guide/scope|title=Code Conventions for the JavaScript Programming Language|first1=Douglas|last1=Crockford|access-date=2015-01-04}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)