this (computer programming)
::concepts
this, self, and Me are keywords used in some computer programming languages to refer to the object, class, or other entity that the currently running code is part of. The entity referred to by these keywords thus depends on the execution context (such as which object is having its method called). Different programming languages use these keywords in slightly different ways. In languages where a keyword like "this" is mandatory, the keyword is the only way to access data and methods stored in the current object. Where optional, they can disambiguate variables and functions with the same name.
This (computer programming) sections
Intro Object-oriented programming Subtleties and difficulties Implementations See also References Further reading External links
PREVIOUS: Intro | NEXT: Object-oriented programming |
<< | >> |
Object::method Class::function Language::keyword Methods::source Which::called Example::instance
this, self, and Me are keywords used in some computer programming languages to refer to the object, class, or other entity that the currently running code is part of. The entity referred to by these keywords thus depends on the execution context (such as which object is having its method called). Different programming languages use these keywords in slightly different ways. In languages where a keyword like "this" is mandatory, the keyword is the only way to access data and methods stored in the current object. Where optional, they can disambiguate variables and functions with the same name.
This (computer programming) sections
Intro Object-oriented programming Subtleties and difficulties Implementations See also References Further reading External links
PREVIOUS: Intro | NEXT: Object-oriented programming |
<< | >> |